-
Notifications
You must be signed in to change notification settings - Fork 70
feat: add find field (by name) support to NestedType #194
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
| iceberg::SchemaField field2(5, "bar", iceberg::string(), true); | ||
| iceberg::Schema schema({field1, field2}, 100); | ||
| }, | ||
| ::testing::ThrowsMessage<std::runtime_error>( |
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.
Why this gets removed?
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.
The logic for detecting duplicate IDs has been moved to GetFieldById. Didn’t we agree earlier that no exceptions would be thrown?
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.
You're right.
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.
For list's element and map's key, value, do we need to do the same processing? However, I think it's a bit strange to handle it in GetFieldByName(), they are easy, so I didn't change its exception-throwing form.
865c2eb to
0a2b037
Compare
wgtmac
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.
Generally looks good. Left some nits.
|
BTW, the PR title is broken... |
… MapType
- Implemented case-insensitive GetFieldByName in NestedType subclasses.
- Added lazy initialization for maps in StructType
- Handled duplicate names/IDs with Status returns instead of throws.
- Streamlined the macro to reduce nesting and improve readability by using an inline if statement.
wgtmac
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. Left some nits. Thanks for working on this!
… MapType