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

mingliang 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 f7f801a698 [MINOR][VL] Simplify code for PartialProjectRule (#8273)
f7f801a698 is described below

commit f7f801a6986e301966dcdce988d51fbe8f238c10
Author: Mingliang Zhu <[email protected]>
AuthorDate: Mon Dec 23 17:39:33 2024 +0800

    [MINOR][VL] Simplify code for PartialProjectRule (#8273)
---
 .../scala/org/apache/gluten/extension/PartialProjectRule.scala | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/backends-velox/src/main/scala/org/apache/gluten/extension/PartialProjectRule.scala
 
b/backends-velox/src/main/scala/org/apache/gluten/extension/PartialProjectRule.scala
index 066f09d75e..73d1651e2f 100644
--- 
a/backends-velox/src/main/scala/org/apache/gluten/extension/PartialProjectRule.scala
+++ 
b/backends-velox/src/main/scala/org/apache/gluten/extension/PartialProjectRule.scala
@@ -27,12 +27,12 @@ case class PartialProjectRule(spark: SparkSession) extends 
Rule[SparkPlan] {
     plan.transformUp {
       case plan: ProjectExec =>
         val transformer = ColumnarPartialProjectExec.create(plan)
-        if (transformer.doValidate().ok()) {
-          if 
(transformer.child.asInstanceOf[ColumnarPartialProjectExec].doValidate().ok()) {
-            transformer
-          } else plan
+        if (
+          transformer.doValidate().ok() &&
+          
transformer.child.asInstanceOf[ColumnarPartialProjectExec].doValidate().ok()
+        ) {
+          transformer
         } else plan
-      case p => p
     }
   }
 }


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

Reply via email to