Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lgbo-ustc committed Dec 10, 2024
1 parent 11c7e2c commit 379e848
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ case class AddPreProjectionForHashJoin(session: SparkSession)
eliminateProjectList(hashJoin.left.outputSet, leftReplacedExpressions.values.toSeq)
val rightProjectExprs =
eliminateProjectList(hashJoin.right.outputSet, rightReplacedExpressions.values.toSeq)
hashJoin.copy(
val newHashJoin = hashJoin.copy(
leftKeys = newLeftKeys,
rightKeys = newRightKeys,
condition = newCondition,
Expand All @@ -75,6 +75,11 @@ case class AddPreProjectionForHashJoin(session: SparkSession)
ProjectExecTransformer(rightProjectExprs, hashJoin.right)
} else { hashJoin.right }
)
if (leftReplacedExpressions.size > 0 || rightReplacedExpressions.size > 0) {
ProjectExecTransformer(hashJoin.output, newHashJoin)
} else {
newHashJoin
}
}
}

Expand Down

0 comments on commit 379e848

Please sign in to comment.