NoahKusaba commented on code in PR #3303:
URL: https://github.com/apache/iceberg-rust/pull/3303#discussion_r4150587041
##########
crates/iceberg/src/arrow/schema.rs:
##########
@@ -1190,8 +1190,8 @@ pub(crate) fn
primitive_type_to_arrow_type_with_ree(primitive_type: &PrimitiveTy
/// including nested struct, list, and map fields. This is useful for schema
comparison
/// where metadata differences should be ignored.
struct MetadataStripVisitor {
- /// Stack to track field information during traversal
- field_stack: Vec<Field>,
+ /// Name and nullability of each field being visited, innermost last
+ field_stack: Vec<(String, bool)>,
Review Comment:
Yes. The stack is ordered by nesting depth and never looks fields up by
name, so each field is rebuilt from its own entry even when names repeat. Added
`test_strip_metadata_with_repeated_nested_names` in c23256c4f, which strips
`a.b.a.b` with different nullability at each level.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]