alamb commented on code in PR #8312:
URL: https://github.com/apache/arrow-rs/pull/8312#discussion_r2344268043


##########
parquet/src/schema/types.rs:
##########
@@ -1006,6 +1006,9 @@ pub struct SchemaDescriptor {
     /// -- -- -- -- d
     /// ```
     leaf_to_base: Vec<usize>,
+
+    /// Mapping between the column dotstring path to the leaf index.

Review Comment:
   We also need to update heap_size to account for this new memory usage: 
https://github.com/apache/arrow-rs/blob/edded191d632ab99938eccd86d2f31aee4aa9736/parquet/src/schema/types.rs#L1025-L1027



##########
parquet/src/schema/types.rs:
##########
@@ -1137,11 +1160,13 @@ fn build_tree<'a>(
         Type::PrimitiveType { .. } => {
             let mut path: Vec<String> = vec![];
             path.extend(path_so_far.iter().copied().map(String::from));
+            let column_path = ColumnPath::new(path);
+            leaf_to_idx.insert(column_path.clone(), leaves.len());

Review Comment:
   I am somewhat concerned about this clone, but I suppose if it turns out to 
be a problem, we could change it to Arc or something 🤔 



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