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

Closed
wants to merge 1 commit into 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.

@maswin
Copy link
Member Author

maswin commented Jul 24, 2025

Please add a test to BaseIcebergSystemTables.

Added

@maswin maswin force-pushed the master branch 2 times, most recently from 94b25e1 to f5d3174 Compare July 24, 2025 00:43
@ebyhr
Copy link
Member

ebyhr commented Jul 24, 2025

I think we should go ahead with #25739 instead.

@maswin
Copy link
Member Author

maswin commented Jul 24, 2025

I think we should go ahead with #25739 instead.

The other PR still requires the same set of changes

@ebyhr
Copy link
Member

ebyhr commented Jul 24, 2025

Why? The PR makes $history table call org.apache.iceberg.HistoryTable#convertHistoryEntryFunc method.

@maswin
Copy link
Member Author

maswin commented Jul 24, 2025

Why? The PR makes $history table call org.apache.iceberg.HistoryTable#convertHistoryEntryFunc method.

Ahh ok. Just checked. This change won't be needed there except for the tests part maybe

@ebyhr
Copy link
Member

ebyhr commented Jul 25, 2025

I included your tests in #25739 and added you as a co-author. Let me close this PR.

@ebyhr ebyhr closed this Jul 25, 2025
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