alamb commented on code in PR #7808: URL: https://github.com/apache/arrow-rs/pull/7808#discussion_r2173756985
########## 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: To be clear I was thinking you could use a single hash set (instead of a map + vec) ```rust field_id_to_index: IndexSet<u32>, // (field_id, insert order corresponds to 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