[
https://issues.apache.org/jira/browse/SPARK-56467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan resolved SPARK-56467.
---------------------------------
Fix Version/s: 4.2.0
Resolution: Fixed
Issue resolved by pull request 55335
[https://github.com/apache/spark/pull/55335]
> Route scalar subquery partition filters into DSv2 runtime filtering
> -------------------------------------------------------------------
>
> Key: SPARK-56467
> URL: https://issues.apache.org/jira/browse/SPARK-56467
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 4.0.0
> Reporter: Anton Lykov
> Assignee: Anton Lykov
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.2.0
>
>
> Scalar subquery filters on partition columns (e.g., `WHERE d_date_sk =
> (SELECT min(d_date_sk) FROM ...)`) are excluded from pushdown in DSv2 at
> every stage. The filter lands as a `FilterExec` above `BatchScanExec`,
> evaluated row-by-row — the scan reads all partitions
> with no partition pruning.
> DSv1 already handles this: `FileSourceStrategy` puts subquery filters in
> `partitionFilters`, `isDynamicFilter` classifies them as dynamic, and
> `getPartitionPruningFilterFromBroadcast` calls `ScalarSubquery.toLiteral` at
> execution time for partition pruning via
> `listFiles()`.
> **Proposal**: Route partition-column scalar subquery filters into
> `BatchScanExec.runtimeFilters`, leveraging the existing
> `SupportsRuntimeV2Filtering.filter()` infrastructure. No new interfaces or
> connector changes needed.
> Affected TPC-DS queries: Q5, Q12, Q16, Q20, Q37, Q77, Q80, Q92, Q94, Q95.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]