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 01526e62e [VL] RAS: Remove NoopFilter that has same output schema with 
child (#6324)
01526e62e is described below

commit 01526e62e84b74dd48084ea36d55df3467344c8d
Author: Mingliang Zhu <[email protected]>
AuthorDate: Thu Jul 4 19:20:02 2024 +0800

    [VL] RAS: Remove NoopFilter that has same output schema with child (#6324)
---
 .../gluten/extension/columnar/enumerated/RemoveFilter.scala      | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/enumerated/RemoveFilter.scala
 
b/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/enumerated/RemoveFilter.scala
index e2b8439fd..8b8441e8d 100644
--- 
a/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/enumerated/RemoveFilter.scala
+++ 
b/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/enumerated/RemoveFilter.scala
@@ -41,9 +41,12 @@ object RemoveFilter extends RasRule[SparkPlan] {
   override def shift(node: SparkPlan): Iterable[SparkPlan] = {
     val filter = node.asInstanceOf[FilterExecTransformerBase]
     if (filter.isNoop()) {
-      val out = NoopFilter(filter.child, filter.output)
-      out.copyTagsFrom(filter)
-      return List(out)
+      if (filter.output != filter.child.output) {
+        val out = NoopFilter(filter.child, filter.output)
+        out.copyTagsFrom(filter)
+        return List(out)
+      }
+      return List(filter.child)
     }
     List.empty
   }


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

Reply via email to