-
Notifications
You must be signed in to change notification settings - Fork 19
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
Ibis has no way to convert UDFs to substrait plan #644
Comments
Hi @Anindyadeep -- thanks for raising this! We're currently refactoring UDF support in Ibis to try to make it more consistent across backends. Once that lands, we can look in to how we can better support UDF compilation to substrait. There's currently support for element-wise UDFs, tested against |
@gforsyth , Can you please provide me more details or the link of that (in the documentation) where I can refer to, about registering a function with the backend and then refer it by name in the substrait plan. Also is that thing to be done with substrait manually or can be done using ibis. Thanks |
Documentation is very light (sorry). There's an integration test that shows how to create an It doesn't require using Substrait directly, but it does require defining the UDF in the pyarrow process manually. |
Could not describe my questions better than you did @Anindyadeep! I'll also mention that this feature could be very useful. |
Thanks @OmriLevyTau, but yes this feature would be super useful. |
Ibis is doing some incredible work by integrating substrait for generating substrait plan of the user's query to support cross DB operations in python.
Suppose we have a table like this :
Right now we define udf's in ibis like this
And hence we can apply this function to our tables like this
And applying this function returns this
Even we can mutate our existing table to add a new column with this function.
Before coming to the main problem, consider this, I have a simple expression like this
And now I can generate the substrait plan of this expression using this code :
Hence I can get the substrait plan. But when I am trying to get the substrait plan through an user defined function then I am getting this error:
Doing this gives me the error :
KeyError: 'AnalyticVectorizedUDF'
.I even thought that substrait might also not provide the support for now. But it seems like substrait do support :
type
type
relation
But Not user defined relations.
This concludes that ibis is not supporting generating substrait plans for user defined functions. But it will be awesome if we have one.
The text was updated successfully, but these errors were encountered: