sdd commented on code in PR #317:
URL: https://github.com/apache/iceberg-rust/pull/317#discussion_r1554425354
##########
crates/iceberg/src/spec/schema.rs:
##########
@@ -137,9 +142,55 @@ impl SchemaBuilder {
name_to_id,
lowercase_name_to_id,
id_to_name,
+
+ field_id_to_accessor,
})
}
+ fn build_accessors(&self) -> HashMap<i32, Arc<StructAccessor>> {
Review Comment:
`SchemaVisitor` won't work for this without some modifications. We need to
know the index within `Schema.fields` for each field to create its accessor,
and `visit_struct` does not provide this at the moment.
`visit_struct` and `SchemaVisitor` could be modified to pass the field index
to the visitor's methods. Can we keep this PR as-is and have a TODO so that we
can move on with this working as-is and I or someone else can pick up this
refactor in another PR?
--
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]