Zouxxyy commented on code in PR #11153:
URL:
https://github.com/apache/incubator-gluten/pull/11153#discussion_r2567891601
##########
gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/PushDownFilterToScan.scala:
##########
@@ -31,35 +31,15 @@ object PushDownFilterToScan extends Rule[SparkPlan] with
PredicateHelper {
override def apply(plan: SparkPlan): SparkPlan = plan.transformUp {
case filter: FilterExecTransformerBase =>
filter.child match {
- case fileScan: FileSourceScanExecTransformer =>
- val pushDownFilters =
-
BackendsApiManager.getSparkPlanExecApiInstance.postProcessPushDownFilter(
- splitConjunctivePredicates(filter.cond),
- fileScan)
- val newScan = fileScan.copy(dataFilters = pushDownFilters)
+ case scan: BasicScanExecTransformer
+ if
BackendsApiManager.getSparkPlanExecApiInstance.supportPushDownFilterToScan(
+ scan) && scan.pushDownFilters.isEmpty =>
Review Comment:
> Is `scan.pushDownFilters.isEmpty` redundant?
`pushDownFilters` is an Option variable, and populating it once is
sufficient.
--
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]