scovich commented on code in PR #7720:
URL: https://github.com/apache/arrow-rs/pull/7720#discussion_r2159751831


##########
parquet-variant/src/builder.rs:
##########
@@ -540,7 +535,8 @@ impl<'a> ObjectBuilder<'a> {
         }
 
         // Write field offsets
-        for &(_, offset) in &self.fields {
+        for id in self.parent.dict.values() {
+            let &offset = self.fields.get(id).unwrap();

Review Comment:
   This doesn't look right. The `dict` is the entire metadata dictionary, 
shared by all (sub-)objects in the overall variant value -- parents, siblings, 
children, cousins, etc. It's a superset of the field names for this specific 
object we're finishing.
   
   Unfortunately, I don't know a good way to build an "indirect" map in rust 
that allows the custom key comparator we'd need, to lexically sort field id 
keys according to the string values they represent.



-- 
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]

Reply via email to