TinyMurky commented on code in PR #25497:
URL: https://github.com/apache/datafusion/pull/25497#discussion_r4085505002
##########
datafusion/functions-aggregate/src/array_agg.rs:
##########
@@ -1535,11 +1539,34 @@ impl OrderSensitiveArrayAggAccumulator {
}
let start = self.entries.len();
- let batch_idx = self.batches.len();
- self.batches.push(values);
- self.entries.extend(
- (0..row_count).map(|row_idx| OrderedArrayAggEntry { batch_idx,
row_idx }),
- );
+ let (batch_idx, row_offset) = match self.batches.last() {
+ Some(last_batch)
+ if last_batch.len() + row_count <=
ORDERED_ARRAY_AGG_COALESCE_ROWS =>
Review Comment:
I have add the following codes
https://github.com/apache/datafusion/blob/0ddf5e8e579b9e3566cc19e34f1d41d436a58fc9/datafusion/functions-aggregate/src/array_agg.rs#L1541-L1548
And added following benchmarks to test the 4 KiB cap
https://github.com/apache/datafusion/blob/0ddf5e8e579b9e3566cc19e34f1d41d436a58fc9/datafusion/functions-aggregate/benches/array_agg.rs#L447-L502
--
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]