zhuqi-lucas commented on code in PR #7714:
URL: https://github.com/apache/arrow-rs/pull/7714#discussion_r2159046094
##########
parquet/src/file/writer.rs:
##########
@@ -390,13 +390,33 @@ impl<W: Write + Send> SerializedFileWriter<W> {
}
/// Returns a reference to the underlying writer.
+ ///
+ /// **Warning**: if you write directly to this writer, you will skip
+ /// the `TrackedWrite` buffering and byte‐counting layers. That’ll cause
+ /// the file footer’s recorded offsets and sizes to diverge from reality,
+ /// resulting in an unreadable or corrupted Parquet file.
+ ///
+ /// If you want to write safely to the underlying writer, use
[`Self::write_all`].
pub fn inner(&self) -> &W {
self.buf.inner()
}
+ /// Writes the given buf bytes to the internal buffer.
Review Comment:
Thank you @alamb good suggestion.
--
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]