From bc085d263dda53a6f95483ee88b8803302e359d7 Mon Sep 17 00:00:00 2001 From: xuedongluan Date: Fri, 17 May 2024 22:45:14 +0800 Subject: [PATCH] fix comments --- .../org/apache/comet/CometSparkSessionExtensions.scala | 4 ++-- .../main/scala/org/apache/comet/serde/QueryPlanSerde.scala | 7 ++++--- .../main/scala/org/apache/spark/sql/comet/operators.scala | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala index f352c036f..64e7b3caa 100644 --- a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala +++ b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala @@ -716,11 +716,11 @@ class CometSparkSessionExtensions } case op: CartesianProductExec if !isCometOperatorEnabled(conf, "cross_join") => - withInfo(op, "Union is not enabled") + withInfo(op, "Cross_Join is not enabled") op case op: CartesianProductExec if !op.children.forall(isCometNative(_)) => - withInfo(op, "Union disabled because not all child plans are native") + withInfo(op, "Cross_Join disabled because not all child plans are native") op case op => 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 ab0a91617..71516e16d 100644 --- a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala +++ b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala @@ -2548,13 +2548,14 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim case join: CartesianProductExec if isCometOperatorEnabled(op.conf, "cross_join") => // TODO: Support CartesianProductExec with join condition after new DataFusion release if (join.condition.isDefined) { - withInfo(op, "cross_join with a join condition is not supported") + withInfo(op, "Cross_Join with a join condition is not supported") return None } - None + val joinBuilder = OperatorOuterClass.CrossJoin.newBuilder() + Some(result.setCrossJoin(joinBuilder).build()) case join: CartesianProductExec if !isCometOperatorEnabled(op.conf, "cross_join") => - withInfo(join, "cross_join is not enabled") + withInfo(join, "Cross_Join is not enabled") None case op if isCometSink(op) && op.output.forall(a => supportedDataType(a.dataType)) => diff --git a/spark/src/main/scala/org/apache/spark/sql/comet/operators.scala b/spark/src/main/scala/org/apache/spark/sql/comet/operators.scala index db9bef430..542dc1c0a 100644 --- a/spark/src/main/scala/org/apache/spark/sql/comet/operators.scala +++ b/spark/src/main/scala/org/apache/spark/sql/comet/operators.scala @@ -932,6 +932,7 @@ case class CometCartesianProductExec( override lazy val metrics: Map[String, SQLMetric] = CometMetricNode.baselineMetrics(sparkContext) } + case class CometScanWrapper(override val nativeOp: Operator, override val originalPlan: SparkPlan) extends CometNativeExec with LeafExecNode {