fix: Avoid reading delete manifests for Iceberg statistics - #28420
Draft
Nandakumar-Balagopal wants to merge 1 commit into
Draft
fix: Avoid reading delete manifests for Iceberg statistics#28420Nandakumar-Balagopal wants to merge 1 commit into
Nandakumar-Balagopal wants to merge 1 commit into
Conversation
Contributor
Reviewer's GuideIceberg statistics computation now directly filters and reads only applicable data manifests and required data-file statistics, avoiding delete-manifest planning and reducing metadata I/O and memory usage without changing public behavior. Sequence diagram for optimized Iceberg statistics computationsequenceDiagram
participant Statistics as TableStatisticsMaker
participant Table as IcebergTable
participant Snapshot as Snapshot
participant Manifest as ManifestFiles
participant Utils as IcebergLibUtils
participant Aggregator as StatisticsAggregator
Statistics->>Table: snapshot(snapshotId)
Table-->>Statistics: Snapshot
Statistics->>Snapshot: dataManifests(io)
Snapshot-->>Statistics: ManifestFile list
Statistics->>Statistics: ManifestEvaluator.forRowFilter(filter, spec, true).eval(manifest)
Statistics->>Manifest: read(manifest, io, specs)
Manifest-->>Statistics: ManifestReader
Statistics->>Manifest: select(required statistics fields)
Statistics->>Manifest: filterRows(filter)
Statistics->>Utils: liveEntries(ManifestReader)
Utils-->>Statistics: live DataFile entries
Statistics->>Statistics: copyWithStats(columnIds)
Statistics->>Aggregator: getSummaryFromFiles(data files)
Aggregator-->>Statistics: TableStatistics
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
Author
|
Initial local benchmark Tested
Results using CLI wall-clock time:
The feature branch showed approximately a 15% improvement in this local test. The table returned identical statistics in both versions. This is an initial local result; additional testing with internal statistics timing and remote object storage is still needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Avoid planning and reading Iceberg delete manifests while computing table statistics. The statistics path now reads only applicable data manifests and the required data-file statistics fields.
Motivation and Context
Iceberg table statistics computation currently uses the table scan planning path, which may construct and read delete-file metadata even though delete files are not needed for the data-file statistics calculation. This change reduces unnecessary manifest processing during statistics aggregation.
Impact
No public API or user-facing behavior changes are introduced. Iceberg statistics computation should perform less metadata I/O and use less memory for tables with delete manifests.
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
Summary by Sourcery
Reduce unnecessary metadata processing and resource usage during Iceberg table statistics computation.
Bug Fixes:
Enhancements: