wudidapaopao opened a new pull request, #25886: URL: https://github.com/apache/datafusion/pull/25886
## Which issue does this PR close? - Closes #25885. ## Rationale for this change Aggregate UDFs without arguments receive an empty array slice, so accumulators cannot derive the input row count from their arguments. ## What changes are included in this PR? - `datafusion/expr-common/src/accumulator.rs` adds `AccumulatorUpdateArgs` and the default `update_batch_with_args` interface. - `datafusion/expr-common/src/groups_accumulator.rs` adds `ConvertToStateArgs` and the default `convert_to_state_with_args` interface. - `datafusion/functions-aggregate-common/src/aggregate/groups_accumulator.rs` adapts `GroupsAccumulatorAdapter` to pass per-group row counts, including FILTER and state conversion. - Physical aggregate execution propagates row counts while preserving existing UDAF behavior. ## What is the testing strategy for this PR? Added tests for ungrouped inputless aggregation, grouped Adapter execution, FILTER handling, empty state conversion, partial-skip, nullary signature validation, and the unsupported inputless window path. Validated with formatting checks, full workspace Clippy with `-D warnings`, the relevant crate test suites, `aggregate_skip_partial.slt`, and FFI compilation. ## Are there any user-facing changes? Adds optional, defaulted public accumulator methods. Existing UDAF implementations remain source-compatible. -- 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]
