joe-ucp commented on code in PR #8894:
URL: https://github.com/apache/arrow-rs/pull/8894#discussion_r2572607936


##########
parquet/src/file/metadata/writer.rs:
##########
@@ -487,10 +468,7 @@ impl<'a, W: Write> ParquetMetaDataWriter<'a, W> {
                 (0..self.metadata.row_groups().len())
                     .map(|rg_idx| {
                         let column_indexes = &row_group_column_indexes[rg_idx];
-                        column_indexes
-                            .iter()
-                            .map(|column_index| Some(column_index.clone()))
-                            .collect()
+                        column_indexes.to_vec()

Review Comment:
   ### Helper Removal and Direct Metadata Usage
   
   - Removed the `convert_*` helper functions.
   - Eliminated all `map(|x| Some(x.clone()))` loops.
   - Now directly use:
     - `self.metadata.column_index()`
     - `self.metadata.offset_index()`
   - Finalization functions are now pass-through with the `all_none` collapse 
logic preserved.
   
   These changes simplify the code and improve clarity.



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