Skip to content

fix(table): prune StatisticsList and PartitionStatsList in RemoveSnapshots (#836) - #884

Closed
tanmayrauth wants to merge 1 commit into
apache:mainfrom
tanmayrauth:fix/prune-statistics-in-remove-snapshots-836
Closed

tanmayrauth wants to merge 1 commit into
apache:mainfrom
tanmayrauth:fix/prune-statistics-in-remove-snapshots-836

Conversation

@tanmayrauth

Copy link
Copy Markdown
Contributor

MetadataBuilder had no fields for statistics, so MetadataBuilderFromBase never copied them and buildCommonMetadata never wrote them to output — statistics were silently dropped on every commit.

This fix adds statisticsList and partitionStatsList to MetadataBuilder, populates them from base metadata, carries them through buildCommonMetadata, and prunes entries whose SnapshotID matches a removed snapshot in RemoveSnapshots so stale statistics entries no longer persist after snapshot expiration.

@tanmayrauth
tanmayrauth requested a review from zeroshade as a code owner April 13, 2026 17:30
…shots (apache#836)

MetadataBuilder had no fields for statistics, so MetadataBuilderFromBase
never copied them and buildCommonMetadata never wrote them to output —
statistics were silently dropped on every commit.

This fix adds statisticsList and partitionStatsList to MetadataBuilder,
populates them from base metadata, carries them through buildCommonMetadata,
and prunes entries whose SnapshotID matches a removed snapshot in
RemoveSnapshots so stale statistics entries no longer persist after
snapshot expiration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant