-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Python: Add support for initial default #7699
Conversation
This makes it easier to inherit the sequence numbers
python/tests/utils/test_manifest.py
Outdated
assert manifest_list.content is None | ||
assert manifest_list.sequence_number is None | ||
assert manifest_list.min_sequence_number is None | ||
assert manifest_list.content == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker, but we should have an enum for content
and use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will go well for a long time:
➜ python git:(fd-initial-default) ✗ python3
Python 3.11.3 (main, Apr 7 2023, 20:13:31) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyiceberg.manifest import ManifestContent
>>> ManifestContent.DATA == 0
True
>>> ManifestContent.DATA == 1
False
>>> 1 == ManifestContent.DATA
False
But you're right and this should be an enum, updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's just one blocker in the resolution behavior with required fields. We should also extend tests to cover those cases.
@rdblue Thanks for the review. Went over the comments and added extensive tests for v1 and v2 manifest-file's.
|
Merged. Thanks, @Fokko! The only thing that caught my eye this time around was adding an enum reader. I was thinking that the enum would work like an alias for the ID or that we would translate in the type after it was read, but it looks like this works just fine. |
This makes it easier to inherit the sequence numbers