-
Notifications
You must be signed in to change notification settings - Fork 605
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
feat: implement table valued functions #4582
Comments
Thanks for opening this! This is something that other folks have expressed interest in but we haven't put any concerted effort into making it happen. Can you give a few examples of functions (other than My first thought for the case where the function already exists in the database is that once we refactor the SQL compilers to use dispatching, where all operations--not just
|
The major use-case we have is supporting customers UDTFs. At the moment, we are trying attempting to implement correlation matrices for heat maps and descriptive statistics (like |
Ok, awesome. So it sounds like then the ability to compile an existing UDTF would get you what you want. I think we're in a place where we can start the refactor for the SQL backends, but it'll be a bit before we can land that. I can't promise anything at the moment, but I've been playing with using |
Echoing that I just ran into a need to do this. The use case is similar to a coordinate reprojection, eg |
@NickCrews Can you give a bit more detail about what you're doing and if you had to express it Python or SQL how you'd write (or ideally write it?) |
Actually, a UDF didn't quite make sense because although I was operating a large number of values, the number of unique values was actually small. So I just pre-computed that mapping and then could just .substitute(). So my use case isn't relevant, please ignore. |
This can be done currently with a UDF that returns a struct type, and then |
I've been looking in the documentation and source for a way to do user-defined table valued functions, but I haven't seen any evidence that they are possible. I see in
ibis/expr/rules.py
that there is aTABULAR
enum element defined and commented out. I was trying to come up with a work-around by injecting various things into theoutput_shape
,output_type
, andoutput_dtype
, but I haven't come across any way to cheat one in. I was just wondering if this was something on the roadmap?The text was updated successfully, but these errors were encountered: