You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2026/07/31 07:37:00 UTC

[jira] [Resolved] (SPARK-58315) Improve DSv2 scan statistics handling

     [ https://issues.apache.org/jira/browse/SPARK-58315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-58315.
---------------------------------
    Fix Version/s: 4.3.0
       Resolution: Fixed

Issue resolved by pull request 57487
[https://github.com/apache/spark/pull/57487]

> Improve DSv2 scan statistics handling
> -------------------------------------
>
>                 Key: SPARK-58315
>                 URL: https://issues.apache.org/jira/browse/SPARK-58315
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.3.0
>            Reporter: Yan Yan
>            Assignee: Yan Yan
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.3.0
>
>
> The DSv2 scan statistics path lags the v1 (toPlanStats) path:
> 1. computeStats always fetches full statistics, even when Spark only needs
>    sizeInBytes (CBO/plan stats off). No cheap size-only option for connectors.
> 2. After a filter is fully pushed down, the source may still report whole-table
>    stats. Spark can't tell, so it plans on the too-large, pre-filter estimates.
> 3. Statistics from a v1 scan are silently dropped: V1ScanWrapper doesn't
>    implement SupportsReportStatistics, so computeStats never sees them.
> 4. When only a row count is reported, Spark uses the default (huge) size instead
>    of deriving one from the row count.



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