viirya commented on code in PR #897:
URL: https://github.com/apache/datafusion-comet/pull/897#discussion_r1739281318


##########
spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala:
##########
@@ -95,6 +95,10 @@ class CometSparkSessionExtensions
         plan
       } else {
         plan.transform {
+          case scanExec: FileSourceScanExec if 
scanExec.partitionFilters.nonEmpty =>

Review Comment:
   Hmm, I took a look at `DataSourceV2Strategy`. It have pushed down DPP filter 
(i.e., `DynamicPruning`) into `BatchScanExec` (i.e., `runtimeFilters`).
   
   ```scala
    case PhysicalOperation(project, filters, relation: 
DataSourceV2ScanRelation) =>
         // projection and filters were already pushed down in the optimizer.
         // this uses PhysicalOperation to get the projection and ensure that 
if the batch scan does
         // not support columnar, a projection is added to convert the rows to 
UnsafeRow.
         val (runtimeFilters, postScanFilters) = filters.partition {
           case _: DynamicPruning => true
           case _ => false
         }
         val batchExec = BatchScanExec(relation.output, relation.scan, 
runtimeFilters,
           relation.ordering, relation.relation.table,
           StoragePartitionJoinParams(relation.keyGroupedPartitioning))
   ```



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