Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table functions: add push down projections support #238

Open
alexeyzimarev opened this issue Dec 5, 2024 · 5 comments
Open

Table functions: add push down projections support #238

alexeyzimarev opened this issue Dec 5, 2024 · 5 comments

Comments

@alexeyzimarev
Copy link

DuckDB C API allows push-down projections, it's be great to get it supported here as well.

@Giorgi
Copy link
Owner

Giorgi commented Dec 6, 2024

I didn't add support for it initially because I wanted to wait for the feedback. I can add support for projection push-downs but it will require a third callback making the RegisterTableFunction a bit more complex.

@alexeyzimarev
Copy link
Author

I can confirm that table functions work very well :) Apart from the projection push-down not being available, the other missing thing is limited type support for returned values. Here I found that composite types are fully supported, but I don't think it works with table functions. I am not sure as I only briefly checked the code, will spend a bit more time in the coming days.

@Giorgi
Copy link
Owner

Giorgi commented Dec 6, 2024

Reading composite types is supported for every type except Union. Writing is supported for List and Array only.

@alexeyzimarev
Copy link
Author

Yeah, I only meant what a table function can return.

@Giorgi
Copy link
Owner

Giorgi commented Dec 6, 2024

Table function can return anything as long as WriteValue is implemented for the properties that you want to write. At the moment the writer supports primitive types, Enum, List and Array.

One workaround for complex properties is to write the nested properties to several columns of the result set instead of one column.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants