cloud-fan commented on code in PR #38684:
URL: https://github.com/apache/spark/pull/38684#discussion_r1024884862


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala:
##########
@@ -371,7 +371,8 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan] 
with PredicateHelper {
       }
 
       val finalFilters = normalizedFilters.map(projectionFunc)
-      val withFilter = 
finalFilters.foldRight[LogicalPlan](scanRelation)((cond, plan) => {
+      // bottom-most filters are put in the left of the list.
+      val withFilter = finalFilters.foldLeft[LogicalPlan](scanRelation)((cond, 
plan) => {

Review Comment:
   ```suggestion
         val withFilter = 
finalFilters.foldLeft[LogicalPlan](scanRelation)((plan, cond) => {
   ```



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