zhztheplayer commented on code in PR #6324:
URL: https://github.com/apache/incubator-gluten/pull/6324#discussion_r1664961105


##########
gluten-core/src/main/scala/org/apache/gluten/extension/columnar/enumerated/RemoveFilter.scala:
##########
@@ -41,9 +41,13 @@ 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) {
+        return List(filter.child)

Review Comment:
   Let’s invert the if condition. Also avoid adding ‘else’ clause as ‘return’ 
is already used.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to