scovich commented on code in PR #7833: URL: https://github.com/apache/arrow-rs/pull/7833#discussion_r2183690694
########## parquet-variant/src/builder.rs: ########## @@ -240,6 +240,18 @@ struct MetadataBuilder { } impl MetadataBuilder { + /// Pre-populates the list of field names + fn from_field_names<'a>(field_name: impl Iterator<Item = &'a str>) -> Self { + Self { + field_names: IndexSet::from_iter(field_name.map(|f| f.to_string())), + } + } + + /// Checks whether field names by insertion order is lexicographically sorted + fn is_sorted(&self) -> bool { + !self.field_names.is_empty() && self.field_names.iter().is_sorted() Review Comment: Yeah it comes down to CPU caches and memory bandwidth, for larger dictionaries and/or longer strings. Technically constant factors but not necessarily ones we should ignore. -- 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