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


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala:
##########
@@ -278,7 +285,11 @@ trait FileSourceScanLike extends DataSourceScanExec {
           val index = partitionColumns.indexWhere(a.name == _.name)
           BoundReference(index, partitionColumns(index).dataType, nullable = 
true)
       }, Nil)
-      val ret = selectedPartitions.filter(p => boundPredicate.eval(p.values))
+      var ret = selectedPartitions.filter(p => boundPredicate.eval(p.values))
+      if (dynamicDataFilters.nonEmpty) {

Review Comment:
   to avoid any perf regression caused by the change of `selectedPartitions`, 
here I prune the files again using the dynamic data filters.



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