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


##########
parquet-variant/src/builder.rs:
##########
@@ -567,7 +564,8 @@ impl<'a> ListBuilder<'a> {
 pub struct ObjectBuilder<'a, 'b> {
     parent_buffer: &'a mut ValueBuffer,
     metadata_builder: &'a mut MetadataBuilder,
-    fields: BTreeMap<u32, usize>, // (field_id, offset)
+    fields: Vec<(u32, usize)>,              // (field_id, offset)
+    field_id_to_index: HashMap<u32, usize>, // (field_id, index to `fields`)

Review Comment:
   Would it work to do an IndexMap<u32, u32>, where the key is the field id and 
the value is the field offset?



##########
parquet-variant/src/builder.rs:
##########
@@ -567,7 +564,8 @@ impl<'a> ListBuilder<'a> {
 pub struct ObjectBuilder<'a, 'b> {
     parent_buffer: &'a mut ValueBuffer,
     metadata_builder: &'a mut MetadataBuilder,
-    fields: BTreeMap<u32, usize>, // (field_id, offset)
+    fields: Vec<(u32, usize)>,              // (field_id, offset)
+    field_id_to_index: HashMap<u32, usize>, // (field_id, index to `fields`)

Review Comment:
   Would it work to do an `IndexMap<u32, u32>`, where the key is the field id 
and the value is the field offset?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to