This is an automated email from the ASF dual-hosted git repository.

hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 8109665a1c [GLUTEN-8414][VL] Override doCanonicalize in 
ColumnarPartialProjectExec node (#8415)
8109665a1c is described below

commit 8109665a1ca5acd975ffb61b49c4b5fde52988ae
Author: moslifulong <[email protected]>
AuthorDate: Thu Jan 9 20:38:02 2025 +0800

    [GLUTEN-8414][VL] Override doCanonicalize in ColumnarPartialProjectExec 
node (#8415)
    
    Closes #8414
---
 .../org/apache/gluten/execution/ColumnarPartialProjectExec.scala | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
 
b/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
index 056d19e550..435fd239b3 100644
--- 
a/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
+++ 
b/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
@@ -30,6 +30,7 @@ import org.apache.gluten.vectorized.{ArrowColumnarRow, 
ArrowWritableColumnVector
 import org.apache.spark.rdd.RDD
 import org.apache.spark.sql.catalyst.InternalRow
 import org.apache.spark.sql.catalyst.expressions.{Alias, Attribute, 
AttributeReference, CaseWhen, Coalesce, Expression, If, LambdaFunction, 
NamedExpression, NaNvl, ScalaUDF}
+import org.apache.spark.sql.catalyst.plans.QueryPlan
 import org.apache.spark.sql.execution.{ExplainUtils, ProjectExec, SparkPlan, 
UnaryExecNode}
 import org.apache.spark.sql.execution.metric.{SQLMetric, SQLMetrics}
 import org.apache.spark.sql.hive.HiveUdfUtil
@@ -75,6 +76,14 @@ case class ColumnarPartialProjectExec(original: ProjectExec, 
child: SparkPlan)(
 
   override def output: Seq[Attribute] = child.output ++ 
replacedAliasUdf.map(_.toAttribute)
 
+  override def doCanonicalize(): ColumnarPartialProjectExec = {
+    val canonicalized = original.canonicalized.asInstanceOf[ProjectExec]
+    this.copy(
+      original = canonicalized,
+      child = child.canonicalized
+    )(replacedAliasUdf.map(QueryPlan.normalizeExpressions(_, child.output)))
+  }
+
   override def batchType(): Convention.BatchType = 
BackendsApiManager.getSettings.primaryBatchType
 
   override def rowType0(): Convention.RowType = Convention.RowType.None


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to