-
Notifications
You must be signed in to change notification settings - Fork 66
test: add manifest list test cases #293
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
Conversation
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.
Pull Request Overview
This PR refactors manifest and manifest list schema initialization across different Iceberg format versions (V1, V2, V3). The changes replace dynamic schema construction based on field ID sets with static, version-specific schema definitions, improving code clarity and maintainability.
Key changes:
- Introduced static helper methods (
EntrySchema,WrapFileSchema,FileType/DataFileSchema) for constructing version-specific schemas - Added static
kManifestListSchemaconstants for each format version - Changed V3's
first_row_idparameter fromstd::optional<int64_t>toint64_tin writer constructors - Removed
InitSchemamethods from base adapter classes - Updated error message format strings from
%sto{}for consistency withstd::format
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/iceberg/v1_metadata.h/cc | Added static schema construction methods and manifest list schema constant for V1 |
| src/iceberg/v2_metadata.h/cc | Added static schema construction methods and manifest list schema constant for V2 |
| src/iceberg/v3_metadata.h/cc | Added static schema construction methods, manifest list schema constant, changed first_row_id to non-optional, renamed method to WrapFirstRowId |
| src/iceberg/schema_field.h | Added AsRequired/AsOptional helper methods for field optionality conversion |
| src/iceberg/manifest_writer.h/cc | Changed MakeV3Writer signature to accept non-optional first_row_id, added next_row_id() accessor |
| src/iceberg/manifest_adapter.h/cc | Removed InitSchema methods, moved partition_spec initialization to constructor, added next_row_id() virtual method |
| src/iceberg/manifest_list.h/cc | Changed Type() return type from StructType reference to shared_ptr |
| src/iceberg/manifest_entry.h/cc | Added partition documentation constant, updated default partition type handling |
| src/iceberg/manifest_reader.cc | Simplified manifest list reader initialization using new Type() signature |
| src/iceberg/test/manifest_list_versions_test.cc | New comprehensive test file for cross-version manifest list compatibility |
| src/iceberg/test/CMakeLists.txt | Added new test file to build configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- fix schema definition of manifest list & file with versions - port manifest list test cases from java - fix various issues found by new cases - support manifest writer to write data and delete content
Co-authored-by: Junwang Zhao <zhjwpku@gmail.com>
Co-authored-by: Junwang Zhao <zhjwpku@gmail.com>
zhjwpku
left a comment
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.
LGTM
|
Thanks @zhjwpku and @liurenjie1024 for the review! |
dongxiao1198
left a comment
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.
lgtm
Uh oh!
There was an error while loading. Please reload this page.