Skip to content

Commit ab4d039

Browse files
author
Bhargava Vadlamani
committed
mark_joins_needing_dedupe_incompatible
1 parent 1849788 commit ab4d039

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

spark/src/main/scala/org/apache/spark/sql/comet/operators.scala

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1945,8 +1945,19 @@ object CometBroadcastNestedLoopJoinExec extends CometOperatorSerde[BroadcastNest
19451945
Some(CometConf.COMET_EXEC_BROADCAST_NESTED_LOOP_JOIN_ENABLED)
19461946
}
19471947

1948+
private val unmatchedDuplicationReason =
1949+
"BNLJ with preserved-build side (LeftOuter+BuildLeft, RightOuter+BuildRight, FullOuter)" +
1950+
" duplicates unmatched rows across partitions because the broadcast side is replicated"
1951+
19481952
override def getSupportLevel(op: BroadcastNestedLoopJoinExec): SupportLevel =
1949-
Compatible(None)
1953+
(op.joinType, op.buildSide) match {
1954+
case (LeftOuter, BuildLeft) => Unsupported(Some(unmatchedDuplicationReason))
1955+
case (RightOuter, BuildRight) => Unsupported(Some(unmatchedDuplicationReason))
1956+
case (FullOuter, _) => Unsupported(Some(unmatchedDuplicationReason))
1957+
case _ => Compatible(None)
1958+
}
1959+
1960+
override def getUnsupportedReasons(): Seq[String] = Seq(unmatchedDuplicationReason)
19501961

19511962
/**
19521963
* Convert a Spark operator into a protocol buffer representation that can be passed into native

0 commit comments

Comments
 (0)