You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/18 06:05:10 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #37479: [SPARK-40045][SQL]Optimize the order of filtering predicates

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


##########
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:
   I think this simple heuristic should be safe, although it can't optimize all the cases but it won't make things worse.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org