You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to register UDAFs using SessionContext's register_udaf #874
Describe the bug
During the update of Datafusion from 39 to 41, my script got broken because the register_udaf crashes witht he following error:
in SessionContext.register_udaf(self, udaf)
829 def register_udaf(self, udaf: AggregateUDF) -> None:
830 """Register a user-defined aggregation function (UDAF) with the context."""
--> 831 self.ctx.register_udaf(udaf._udaf)
AttributeError: 'AggregateUDF' object has no attribute '_udaf'
Activity
timsaucer commentedon Sep 19, 2024
Verified. I have a fix I will push up tonight or first thing in the morning. Thank you for the bug report!
In the mean time, are you able to use the udaf via dataframe APIs? I tested the below without the correction, following your code:
returns
emanueledomingo commentedon Sep 20, 2024
By executing you code:
I correctly see the same result as you!
Resolve error on registering udaf apache#874
Fix regression on register_udaf (#878)