peter-toth edited a comment on issue #23802: [SPARK-26893][SQL] Allow partition 
pruning with subquery filters on file source
URL: https://github.com/apache/spark/pull/23802#issuecomment-464736310
 
 
   > > if subquery filter can be a partition filter, why can't it be a data 
filter?
   > 
   > `DataSourceStrategy.translateFilter` can't transform them to `Filter` so 
they will not be pushed down to data source.
   > (Partition filters are handled in `FileSourceScanExec.selectedPartitions` 
and there is no need to transform them to `Filter`.)
   
   Actually I don't see a reason why we can't defer their translation to 
filters until `inputRDD` creation (time of execution). Obviously they need to 
be removed from `metadata` as I did for `PartitionCount` in case they contain 
subquery. This could work if we can be sure that `Filter`s pushed down are 
enforced and we can remove the `FilterExec` parent of `FileSourceScanExec`. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to