timsaucer commented on issue #874:
URL: 
https://github.com/apache/datafusion-python/issues/874#issuecomment-2361418801

   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:
   
   ```
   import pyarrow as pa
   from datafusion import col
   batch = pa.RecordBatch.from_arrays(
       [
           pa.array([0, 1, 2, 3, 4, 5, 6]),
       ],
       names=["a"],
   )
   
   df = ctx.create_dataframe([[batch]])
   
   df.aggregate([], average_udaf(col("a")).alias("udaf")).show()
   ```
   
   returns
   
   ```
   DataFrame()
   +------+
   | udaf |
   +------+
   | 3.0  |
   +------+
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to