Skip to content

Return only published main branch snapshots in history metadata table #26217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maswin
Copy link
Member

@maswin maswin commented Jul 16, 2025

Description

History table returns all snapshots right now. But it must only return published snapshots in main branch.
Modified the implementation to iterate over history entry instead of all snapshots.

Additional context and related issues

Iceberg/Spark reference implementation - https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/HistoryTable.java#L106

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
(X ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Jul 16, 2025
@github-actions github-actions bot added the iceberg Iceberg connector label Jul 16, 2025
Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test to BaseIcebergSystemTables.

for (Snapshot snapshot : icebergTable.snapshots()) {
long snapshotId = snapshot.snapshotId();
Map<Long, Snapshot> snapshots = new HashMap<>();
for (Snapshot snap : icebergTable.snapshots()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

2 participants