Skip to content

Commit

Permalink
adding CoalesceBatches
Browse files Browse the repository at this point in the history
  • Loading branch information
comphead committed Jan 3, 2025
1 parent d50d7e5 commit 02ea910
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions native/core/src/execution/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ use datafusion_physical_expr::aggregate::{AggregateExprBuilder, AggregateFunctio

use crate::execution::shuffle::CompressionCodec;
use crate::execution::spark_plan::SparkPlan;
use datafusion::optimizer::OptimizerConfig;
use datafusion::physical_plan::coalesce_batches::CoalesceBatchesExec;
use datafusion_comet_proto::{
spark_expression::{
Expand Down Expand Up @@ -1188,8 +1189,12 @@ impl PhysicalPlanner {
// SMJ with join filter produces lots of tiny batches
let coalesce_batches: Arc<dyn ExecutionPlan> =
Arc::new(CoalesceBatchesExec::new(
Arc::clone(&join),
self.session_ctx.state().config_options().batch_size(),
Arc::<SortMergeJoinExec>::clone(&join),
self.session_ctx
.state()
.config_options()
.execution
.batch_size,
));
Ok((
scans,
Expand Down

0 comments on commit 02ea910

Please sign in to comment.