You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by ka...@apache.org on 2026/07/06 10:10:44 UTC

(datafusion) branch final-aggr-with-lazily-materialize-poc updated: Use exact capacity for final partition materialization

This is an automated email from the ASF dual-hosted git repository.

Rachelint pushed a commit to branch final-aggr-with-lazily-materialize-poc
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/final-aggr-with-lazily-materialize-poc by this push:
     new 3399820a49 Use exact capacity for final partition materialization
3399820a49 is described below

commit 3399820a492e37a40d149646f18fb255a7727fe2
Author: kamille <ka...@apache.org>
AuthorDate: Mon Jul 6 18:10:28 2026 +0800

    Use exact capacity for final partition materialization
---
 datafusion/physical-plan/src/aggregates/hash_aggregate.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/datafusion/physical-plan/src/aggregates/hash_aggregate.rs b/datafusion/physical-plan/src/aggregates/hash_aggregate.rs
index 80930152e3..ede1dc5f67 100644
--- a/datafusion/physical-plan/src/aggregates/hash_aggregate.rs
+++ b/datafusion/physical-plan/src/aggregates/hash_aggregate.rs
@@ -114,7 +114,6 @@ impl PartitionRunStream {
                     &chunk_runs,
                     column_idx,
                     num_rows,
-                    self.batch_size,
                 )
             })
             .collect::<Vec<_>>();
@@ -383,13 +382,12 @@ fn materialize_reordered_column(
     reordered_runs: &[ReorderedRun],
     column_idx: usize,
     num_rows: usize,
-    target_batch_size: usize,
 ) -> ArrayRef {
     let source_refs = source_batches
         .iter()
         .map(|batch| &batch.columns[column_idx])
         .collect::<Vec<&ArrayData>>();
-    let mut mutable = MutableArrayData::new(source_refs, false, target_batch_size);
+    let mut mutable = MutableArrayData::new(source_refs, false, num_rows);
 
     for run in reordered_runs {
         mutable.extend(run.batch_idx, run.start, run.end);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org