kosiew opened a new pull request, #1192:
URL: https://github.com/apache/datafusion-python/pull/1192

   ## Which issue does this PR close?
   
   - Closes #1190
   
   ## Rationale for this change
   
   This PR updates the `MyAccumulator` implementation in the Python UDAF 
example to properly handle updates and state using `list[pa.Array]` types, 
aligning with the expected interface in newer versions of PyArrow. Without this 
change, the accumulator may behave incorrectly or fail when integrating with 
systems expecting lists of arrays.
   
   ## What changes are included in this PR?
   
   - Updated `update()` method signature to accept `list[pa.Array]` instead of 
a single `pa.Array`.
   - Modified the `merge()` method to correctly index into the first element of 
`states`, assuming it's a list.
   - Changed `state()` to return a list of `pa.Array` instead of a single 
`pa.Array` for consistency with updated interface expectations.
   
   ## Are these changes tested?
   
   The patch updates an example file, which may be executed to validate 
expected behavior. If automated tests are not available for this specific UDAF 
example, manual verification is recommended.
   
   ## Are there any user-facing changes?
   
   Yes, this affects users who are following or adapting the 
`sql-using-python-udaf.py` example. They should now provide and expect 
`list[pa.Array]` for `update`, `merge`, and `state` methods, in alignment with 
PyArrow expectations.
   
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to