szehon-ho commented on code in PR #57340:
URL: https://github.com/apache/spark/pull/57340#discussion_r3606285906


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala:
##########
@@ -213,7 +213,12 @@ object FileSourceStrategy extends Strategy with 
PredicateHelper with Logging {
       logInfo(log"Pushed Filters: ${MDC(PUSHED_FILTERS, 
pushedFilters.mkString(","))}")
 
       // Predicates with both partition keys and attributes need to be 
evaluated after the scan.
-      val afterScanFilters = filterSet -- 
partitionKeyFilters.filter(_.references.nonEmpty)
+      // When the FileIndex reports explicit full-pushdown guarantees, use 
them as the only basis
+      // for removing filters from the row-level FilterExec above the scan.
+      val afterScanFilters = fsRelation.location.fullyPushedFilters match {
+        case Some(fullyPushedFilters) => filterSet -- fullyPushedFilters
+        case None => filterSet -- 
partitionKeyFilters.filter(_.references.nonEmpty)

Review Comment:
   yes, let me address with the other concern (that we dont call listFiles yet 
until physical execution..)



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