alamb commented on code in PR #12017:
URL: https://github.com/apache/datafusion/pull/12017#discussion_r1719087314
##########
datafusion/functions-aggregate-common/src/aggregate/groups_accumulator/bool_op.rs:
##########
@@ -77,7 +82,9 @@ where
if self.values.len() < total_num_groups {
let new_groups = total_num_groups - self.values.len();
- self.values.append_n(new_groups, Default::default());
+ // Fill with the identity element, so that when the first non-null
value is encountered,
+ // it will combine with the identity and the result will be the
first non-null value itself.
+ self.values.append_n(new_groups, self.identity);
Review Comment:
Nice -- this is similar to the default value for the PrimitiveOp accumulator
too
--
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]