diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index fab8cda04e..0a790a0146 100644 --- a/core/src/execution/datafusion/planner.rs +++ b/core/src/execution/datafusion/planner.rs @@ -91,7 +91,7 @@ use crate::{ agg_expr::ExprStruct as AggExprStruct, expr::ExprStruct, literal::Value, AggExpr, Expr, ScalarFunc, }, - spark_operator::{operator::OpStruct, JoinType, Operator}, + spark_operator::{operator::OpStruct, BuildSide, JoinType, Operator}, spark_partitioning::{partitioning::PartitioningStruct, Partitioning as SparkPartitioning}, }, }; @@ -981,7 +981,7 @@ impl PhysicalPlanner { )?); // If the hash join is build right, we need to swap the left and right - let hash_join = if join.build_side == 0 { + let hash_join = if join.build_side == BuildSide::BuildLeft { hash_join } else { swap_hash_join(hash_join.as_ref(), PartitionMode::Partitioned)?