steven-aerts commented on a change in pull request #33191:
URL: https://github.com/apache/spark/pull/33191#discussion_r664724961



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PruneFileSourcePartitions.scala
##########
@@ -120,7 +120,7 @@ private[sql] object PruneFileSourcePartitions
 
     case op @ PhysicalOperation(projects, filters,
         v2Relation @ DataSourceV2ScanRelation(_, scan: FileScan, output))
-        if filters.nonEmpty && scan.readDataSchema.nonEmpty =>

Review comment:
       @cloud-fan the non-emptiness is indirectly checked 4 lines down on line 
128.
   
   Do you want me to add it here again, to prevent 
`getPartitionKeyFiltersAndDataFilters()` from being called?
   `getPartitionKeyFiltersAndDataFilters` is able to handle 
`scan.readPartitionSchema` being empty.  So it would only be a performance 
optimization I think.
   
   I do not mind to add it, just want to know your opinion.




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