alamb commented on code in PR #10052:
URL: https://github.com/apache/arrow-rs/pull/10052#discussion_r3344072262
##########
parquet/src/file/writer.rs:
##########
@@ -701,20 +762,29 @@ impl<'a, W: Write + Send> SerializedRowGroupWriter<'a, W>
{
));
}
- let src_dictionary_offset = metadata.dictionary_page_offset();
- let src_data_offset = metadata.data_page_offset();
- let src_offset = src_dictionary_offset.unwrap_or(src_data_offset);
+ let src_offset = metadata
+ .dictionary_page_offset()
+ .unwrap_or_else(|| metadata.data_page_offset());
let src_length = metadata.compressed_size();
-
let write_offset = self.buf.bytes_written();
Review Comment:
It is kind of hard to see in the github diff, but basically I just
refactored the stuff before this call into one function
(`begin_appended_column`) and the stuff after this call into another
(`finish_appended_column`)
The code is almost the same, just moved around and documented better
--
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]