Skip to content

Commit de7acbe

Browse files
committed
fix: Do not replace SMJ with HJ for LeftSemi
1 parent 021ef2d commit de7acbe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spark/src/main/scala/org/apache/comet/rules/RewriteJoin.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ object RewriteJoin extends JoinSelectionHelper {
6868
case smj: SortMergeJoinExec =>
6969
getSmjBuildSide(smj) match {
7070
case Some(BuildRight) if smj.joinType == LeftAnti || smj.joinType == LeftSemi =>
71-
withInfo(
72-
smj,
73-
s"Cannot rewrite SortMergeJoin to HashJoin: BuildRight with ${smj.joinType} is not supported")
7471
// LeftAnti https://github.com/apache/datafusion-comet/issues/457
7572
// LeftSemi https://github.com/apache/datafusion-comet/issues/2667
73+
withInfo(
74+
smj,
75+
s"Cannot rewrite SortMergeJoin to HashJoin: " +
76+
s"BuildRight with ${smj.joinType} is not supported")
7677
plan
7778
case Some(buildSide) =>
7879
ShuffledHashJoinExec(

0 commit comments

Comments
 (0)