From 4ea309fe122d3f856aab6112ea28420ba67e2811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Heres?= Date: Thu, 19 Dec 2024 15:56:46 +0100 Subject: [PATCH] Reinstantiate join order (#1122) --- .../src/state/execution_graph/execution_stage.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ballista/scheduler/src/state/execution_graph/execution_stage.rs b/ballista/scheduler/src/state/execution_graph/execution_stage.rs index ea3a5e84e..9d3a821bc 100644 --- a/ballista/scheduler/src/state/execution_graph/execution_stage.rs +++ b/ballista/scheduler/src/state/execution_graph/execution_stage.rs @@ -22,6 +22,7 @@ use std::sync::Arc; use std::time::{SystemTime, UNIX_EPOCH}; use datafusion::physical_optimizer::aggregate_statistics::AggregateStatistics; +use datafusion::physical_optimizer::join_selection::JoinSelection; use datafusion::physical_optimizer::PhysicalOptimizerRule; use datafusion::physical_plan::display::DisplayableExecutionPlan; use datafusion::physical_plan::metrics::{MetricValue, MetricsSet}; @@ -359,12 +360,9 @@ impl UnresolvedStage { &input_locations, )?; - // TODO reinstate this logic once https://github.com/apache/datafusion/issues/10978 - // is fixed - // Optimize join order and statistics based on new resolved statistics - // let optimize_join = JoinSelection::new(); - // let config = SessionConfig::default(); - // let plan = optimize_join.optimize(plan, config.options())?; + let optimize_join = JoinSelection::new(); + let config = SessionConfig::default(); + let plan = optimize_join.optimize(plan, config.options())?; let optimize_aggregate = AggregateStatistics::new(); let plan =