You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/04/14 08:42:00 UTC
[jira] [Updated] (SPARK-56467) Route scalar subquery partition filters into DSv2 runtime filtering
[ https://issues.apache.org/jira/browse/SPARK-56467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-56467:
-----------------------------------
Labels: pull-request-available (was: )
> 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
> Priority: Major
> Labels: pull-request-available
>
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org