-
Notifications
You must be signed in to change notification settings - Fork 608
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
bug: Can't set up an aggregate UDF with Any
as input and return type
#10760
Comments
Thanks for opening an issue about this. For the input, you can simply leave off the annotation, and that will behave as if it were For the output, there's currently no way to spell that in Ibis, because Ibis requires type information about expressions it produces, and I would recommended annotating the return type with the type you plan to use |
thing is, I plan to use |
Currently we don't have a way to overload any UDF signature, so you'll have to create a separate function for each type, like Eventually we want make this kind of thing transparent to the user, but it hasn't been implemented yet. |
And how do I tell @ibis.udf.agg.builtin
def latest_float(expr, name="latest") -> float:
"""Get the latest value in the column, just like Druids LATEST clause.""" But got this error:
|
Never mind, I've found my error, I should have used |
What happened?
I'm trying to register an aggregate UDF like so:
and am getting this error:
LATEST
is a Druid SQL clause and it can take and return any type, so it seems that Ibis UDF's should be able to acceptAny
in type annotations.What version of ibis are you using?
ibis=9.5.0
python=3.11
pydruid=0.6.9
What backend(s) are you using, if any?
Apache Druid
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: