rluvaton commented on code in PR #17592:
URL: https://github.com/apache/datafusion/pull/17592#discussion_r2547288762
##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/mod.rs:
##########
@@ -251,12 +284,27 @@ struct VectorizedOperationBuffers {
impl VectorizedOperationBuffers {
fn clear(&mut self) {
- self.append_row_indices.clear();
+ self.clear_append_row_indices();
self.equal_to_row_indices.clear();
self.equal_to_group_indices.clear();
self.equal_to_results.clear();
self.remaining_row_indices.clear();
}
+
+ fn add_append_row_index(&mut self, row: usize) {
Review Comment:
> I think even better, it should also be possible to just check the length
of `append_row_indices`. If this is equal to the size of the incoming batch,
all of the indices should be consecutive already (i.e. all values are unique),
so it becomes a really cheap check.
but what if we only need to add the last half of the column. then the length
would not be equal but it is still consecutive
--
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]