liukun4515 commented on code in PR #1935:
URL: https://github.com/apache/arrow-rs/pull/1935#discussion_r908068424


##########
parquet/src/file/writer.rs:
##########
@@ -339,11 +400,11 @@ impl<'a, W: Write> SerializedRowGroupWriter<'a, W> {
                 .set_num_rows(self.total_rows_written.unwrap_or(0) as i64)
                 .build()?;
 
-            let metadata = Arc::new(row_group_metadata);
-            self.row_group_metadata = Some(metadata.clone());
+            let clone_row_group_metadata = row_group_metadata.clone();
+            self.row_group_metadata = Some(Arc::new(row_group_metadata));

Review Comment:
   Clone the row group metadata and save it which will be used to construct the 
file metadata.
   Why don't use the ptr of metadata?
   In order to change the field of the column metadata in the row group 
metadata, we need a mutable data, the Arc::<T>() immutable.



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