haohuaijin commented on code in PR #22816:
URL: https://github.com/apache/datafusion/pull/22816#discussion_r3374248471


##########
datafusion/physical-plan/src/aggregates/row_hash.rs:
##########
@@ -1230,11 +1232,7 @@ impl GroupedHashAggregateStream {
                 .collect::<Result<Vec<_>>>()?;
             let false_filter = BooleanArray::from(vec![false]);
             for (acc, args) in 
self.accumulators.iter_mut().zip(null_args.iter()) {
-                if self.mode.input_mode() == AggregateInputMode::Raw {
-                    acc.update_batch(args, &[0], Some(&false_filter), 
total_groups)?;
-                } else {
-                    acc.merge_batch(args, &[0], Some(&false_filter), 
total_groups)?;
-                }

Review Comment:
   i check more on this part, and found the `Final` / `FinalPartitioned` build 
their group-by via `as_final()`, which hard-codes `has_grouping_set: false`. So 
`init_empty_grouping_sets` hits its `!has_grouping_set()` early-return and 
never call the `merge_batch`.



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