huaxingao commented on code in PR #37479:
URL: https://github.com/apache/spark/pull/37479#discussion_r952023794


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/PushDownUtils.scala:
##########
@@ -65,7 +65,7 @@ object PushDownUtils extends PredicateHelper {
         val postScanFilters = r.pushFilters(translatedFilters.toArray).map { 
filter =>
           DataSourceStrategy.rebuildExpressionFromFilter(filter, 
translatedFilterToExpr)
         }
-        (Left(r.pushedFilters()), (untranslatableExprs ++ 
postScanFilters).toSeq)
+        (Left(r.pushedFilters()), (postScanFilters ++ 
untranslatableExprs).toSeq)

Review Comment:
   Can we add a comment here to state that `untranslatableExprs` needs to be on 
the right side and also briefly explain the reason? 



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/PushDownUtils.scala:
##########
@@ -94,7 +94,7 @@ object PushDownUtils extends PredicateHelper {
         val postScanFilters = r.pushPredicates(translatedFilters.toArray).map 
{ predicate =>
           DataSourceV2Strategy.rebuildExpressionFromFilter(predicate, 
translatedFilterToExpr)
         }
-        (Right(r.pushedPredicates), (untranslatableExprs ++ 
postScanFilters).toSeq)
+        (Right(r.pushedPredicates), (postScanFilters ++ 
untranslatableExprs).toSeq)

Review Comment:
   same comment as the above



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