From d494b4fe05939f929aa97795c23b38eb3d644c78 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Wed, 29 May 2024 21:48:46 -0700 Subject: [PATCH] Use BuildSide enum --- core/src/execution/datafusion/planner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index fab8cda04..ec7d26180 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 as i32 { hash_join } else { swap_hash_join(hash_join.as_ref(), PartitionMode::Partitioned)?