Skip to content

Commit

Permalink
coalesce batches after scan
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed May 30, 2024
1 parent 8c532be commit cab4a6a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/execution/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ use datafusion::{
},
physical_plan::{
aggregates::{AggregateMode as DFAggregateMode, PhysicalGroupBy},
coalesce_batches::CoalesceBatchesExec,
filter::FilterExec,
joins::{utils::JoinFilter, HashJoinExec, PartitionMode, SortMergeJoinExec},
limit::LocalLimitExec,
Expand Down Expand Up @@ -725,7 +726,11 @@ impl PhysicalPlanner {
.map(|r| (r, format!("col_{}", idx)))
})
.collect();
Ok((scans, Arc::new(ProjectionExec::try_new(exprs?, child)?)))

let projection = Arc::new(ProjectionExec::try_new(exprs?, child)?);
let coalesced: Arc<dyn ExecutionPlan> =
Arc::new(CoalesceBatchesExec::new(projection, 4196));
Ok((scans, coalesced))
}
OpStruct::Filter(filter) => {
assert!(children.len() == 1);
Expand Down

0 comments on commit cab4a6a

Please sign in to comment.