mbutrovich commented on code in PR #3858:
URL: https://github.com/apache/datafusion-comet/pull/3858#discussion_r3030092667
##########
native/shuffle/src/partitioners/multi_partition.rs:
##########
@@ -203,6 +203,20 @@ impl MultiPartitionShuffleRepartitioner {
return Ok(());
}
+ // For zero-column schemas (e.g. COUNT queries), assign all rows to
partition 0.
+ if input.num_columns() == 0 {
+ let num_rows = input.num_rows();
+ self.metrics.baseline.record_output(num_rows);
+ let batch_idx = self.buffered_batches.len() as u32;
+ self.buffered_batches.push(input);
+ let indices = &mut self.partition_indices[0];
+ indices.reserve(num_rows);
Review Comment:
You're going to allocate O(num_rows) for indices?
--
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]