Skip to content

feat: add construct_ref for table_metadata#1043

Merged
Fokko merged 2 commits intoapache:mainfrom
ZENOTME:construct_ref
Mar 7, 2025
Merged

feat: add construct_ref for table_metadata#1043
Fokko merged 2 commits intoapache:mainfrom
ZENOTME:construct_ref

Conversation

@ZENOTME
Copy link
Copy Markdown
Contributor

@ZENOTME ZENOTME commented Mar 5, 2025

Which issue does this PR close?

What changes are included in this PR?

This PR add a construct_ref to insert the main branch if it's not found in refs. ref from: https://github.com/apache/iceberg-python/blob/f45966208dac7c0a2fbe5b16d643a816db2bacb3/pyiceberg/table/metadata.py#L117

Are these changes tested?

@ZENOTME
Copy link
Copy Markdown
Contributor Author

ZENOTME commented Mar 5, 2025

cc @liurenjie1024 @Xuanwo @Fokko

Fokko
Fokko previously approved these changes Mar 7, 2025
Copy link
Copy Markdown
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

LGTM, should we throw in a test?

@ZENOTME
Copy link
Copy Markdown
Contributor Author

ZENOTME commented Mar 7, 2025

LGTM, should we throw in a test?

Have added the test

@Fokko Fokko merged commit 82da826 into apache:main Mar 7, 2025
17 checks passed
@Fokko
Copy link
Copy Markdown
Contributor

Fokko commented Mar 7, 2025

Thanks @ZENOTME 🙌

Fokko added a commit that referenced this pull request Mar 7, 2025
I was checking this while reviewing #1043

I don't think the `current-snapshot-id` can be zero while there are no snapshots.
@ZENOTME ZENOTME deleted the construct_ref branch March 7, 2025 14:50
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.

2 participants