rluvaton commented on code in PR #19429:
URL: https://github.com/apache/datafusion/pull/19429#discussion_r2637321226
##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/mod.rs:
##########
@@ -540,14 +540,13 @@ impl<const STREAMING: bool> GroupValuesColumn<STREAMING> {
// into `vectorized_equal_to_row_indices` and
`vectorized_equal_to_group_indices`.
let list_offset = group_index_view.value() as usize;
let group_index_list = &self.group_index_lists[list_offset];
- for &group_index in group_index_list {
- self.vectorized_operation_buffers
- .equal_to_row_indices
- .push(row);
- self.vectorized_operation_buffers
- .equal_to_group_indices
- .push(group_index);
- }
+
+ self.vectorized_operation_buffers
+ .equal_to_group_indices
+ .extend_from_slice(group_index_list);
+ self.vectorized_operation_buffers
+ .equal_to_row_indices
+ .extend(std::iter::repeat_n(row, group_index_list.len()));
Review Comment:
Note: I swapped the order here, first insert the `equal_to_group_indices`
and then `equal_to_row_indices` to make `equal_to_group_indices` closer to
`group_index_list`
--
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]