wudidapaopao opened a new issue, #25885:
URL: https://github.com/apache/datafusion/issues/25885

   ### Is your feature request related to a problem or challenge?
   
   `Accumulator` and `GroupsAccumulator` generally derive the input row count 
from argument arrays. An aggregate UDF without arguments receives an empty 
array slice, so regular aggregation, `GroupsAccumulatorAdapter`, and 
partial-skip state conversion cannot determine how many rows to process.
   
   ### Describe the solution you'd like
   
   Add future-proof argument structs that carry both evaluated arguments and an 
explicit row count, with default trait methods that preserve compatibility with 
existing UDAFs.
   
   Propagate the row count through ungrouped aggregation, grouped adapter 
updates, and row-aligned partial-skip state conversion. Support native Rust 
aggregate UDFs; aggregate windows and FFI UDAFs are out of scope.
   
   ### Describe alternatives you've considered
   
   - Add separate `*_with_num_rows` methods. Argument structs are easier to 
extend without adding more trait methods.
   - Materialize a dummy argument array. This adds unnecessary allocation and 
evaluation work.
   
   ### Additional context
   
   This was extracted from the review of 
https://github.com/apache/datafusion/pull/25849#pullrequestreview-5349621815 
and is a prerequisite for https://github.com/apache/datafusion/issues/25847.
   


-- 
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