liujiayi771 commented on code in PR #5246:
URL: https://github.com/apache/incubator-gluten/pull/5246#discussion_r1547284818


##########
backends-velox/src/main/scala/org/apache/gluten/execution/FilterExecTransformer.scala:
##########
@@ -22,13 +22,22 @@ import org.apache.spark.sql.execution.SparkPlan
 case class FilterExecTransformer(condition: Expression, child: SparkPlan)
   extends FilterExecTransformerBase(condition, child) {
   override protected def getRemainingCondition: Expression = {
-    val scanFilters = child match {
-      // Get the filters including the manually pushed down ones.
-      case basicScanExecTransformer: BasicScanExecTransformer =>
-        basicScanExecTransformer.filterExprs()
-      // For fallback scan, we need to keep original filter.
-      case _ =>
-        Seq.empty[Expression]
+    var scanFilters: Seq[Expression] = Seq()

Review Comment:
   Can this not work?
   ```scala
   val scanFilters = child match {
     case basic: BasicScanExecTransformer =>
       basic.filterExprs()
     case _ =>
       child match {
         // Get the filters including the manually pushed down ones.
         case basicScanExecTransformer: BasicScanExecTransformer =>
           basicScanExecTransformer.filterExprs()
         // For fallback scan, we need to keep original filter.
         //      case batchScanExecTransformer: BatchScanExecTransformerBase =>
         //        batchScanExecTransformer.filterExprs()
         case _ =>
           Seq.empty[Expression]
       }
   }
   ```



-- 
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