sidred commented on code in PR #3531:
URL: https://github.com/apache/arrow-rs/pull/3531#discussion_r1070370494


##########
parquet/src/file/writer.rs:
##########
@@ -499,9 +499,11 @@ impl<'a, W: Write> SerializedRowGroupWriter<'a, W> {
             self.assert_previous_writer_closed()?;
 
             let column_chunks = std::mem::take(&mut self.column_chunks);
+            let total_bytes_size =
+                column_chunks.iter().map(|c| c.uncompressed_size()).sum();
             let row_group_metadata = 
RowGroupMetaData::builder(self.descr.clone())
                 .set_column_metadata(column_chunks)
-                .set_total_byte_size(self.total_bytes_written as i64)
+                .set_total_byte_size(total_bytes_size)

Review Comment:
   I am not sure this is the right way. One alternative is to set the 
self.total_bytes_written to `*total_bytes_written += 
r.metadata.uncompressed_size();` in the on_close closure



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