Dandandan commented on a change in pull request #922:
URL: https://github.com/apache/arrow-datafusion/pull/922#discussion_r693859227
##########
File path: datafusion/src/physical_plan/hash_aggregate.rs
##########
@@ -365,10 +365,16 @@ fn group_aggregate_batch(
// actually the same key value as the group in
// existing_idx (aka group_values @ row)
let group_state = &group_states[*group_idx];
- group_values
- .iter()
- .zip(group_state.group_by_values.iter())
- .all(|(array, scalar)| scalar.eq_array(array, row))
+ group_values
+ .iter()
+ .zip(group_state.group_by_values.iter())
+ .all(|(array, scalar)| {
+ if array.null_count() > 0 {
+ scalar.eq_array(array, row)
Review comment:
I think this checking and branching on null count should be preferable
done only once per batch, outside the for loop in this function.
--
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]