diff --git a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala index f544b899af..0b465df7bd 100644 --- a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala +++ b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala @@ -2417,10 +2417,12 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim return None } - if (join.buildSide == BuildRight && join.joinType == LeftAnti) { - // DataFusion HashJoin LeftAnti has bugs on null keys. - withInfo(join, "BuildRight with LeftAnti is not supported") - return None + join match { + case b: BroadcastHashJoinExec if b.isNullAwareAntiJoin => + // DataFusion HashJoin LeftAnti has bugs on null keys. + withInfo(join, "DataFusion doesn't support null-aware anti join") + return None + case _ => // no-op } val condition = join.condition.map { cond =>