Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazantsev Maksim committed Jan 30, 2025
1 parent b661960 commit 9697eae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
18 changes: 1 addition & 17 deletions spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2366,23 +2366,7 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim
case _: ArrayIntersect => convert(CometArrayIntersect)
case _: ArrayJoin => convert(CometArrayJoin)
case _: ArraysOverlap => convert(CometArraysOverlap)
case _ if expr.prettyName == "array_except" =>
if (CometConf.COMET_CAST_ALLOW_INCOMPATIBLE.get()) {
createBinaryExpr(
expr,
expr.children(0),
expr.children(1),
inputs,
binding,
(builder, binaryExpr) => builder.setArrayExcept(binaryExpr))
} else {
withInfo(
expr,
s"array_except is not fully compatible with Spark. " +
s"Set ${CometConf.COMET_CAST_ALLOW_INCOMPATIBLE.key}=true " +
"to allow it anyway.")
None
}
case _ if expr.prettyName == "array_except" => convert(CometArrayExcept)
case _ =>
withInfo(expr, s"${expr.prettyName} is not supported", expr.children: _*)
None
Expand Down
15 changes: 15 additions & 0 deletions spark/src/main/scala/org/apache/comet/serde/arrays.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ object CometArraysOverlap extends CometExpressionSerde with IncompatExpr {
}
}

object CometArrayExcept extends CometExpressionSerde with IncompatExpr {
override def convert(
expr: Expression,
inputs: Seq[Attribute],
binding: Boolean): Option[ExprOuterClass.Expr] = {
createBinaryExpr(
expr,
expr.children(0),
expr.children(1),
inputs,
binding,
(builder, binaryExpr) => builder.setArrayExcept(binaryExpr))
}
}

object CometArrayJoin extends CometExpressionSerde with IncompatExpr {
override def convert(
expr: Expression,
Expand Down

0 comments on commit 9697eae

Please sign in to comment.