You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alexandreyc (via GitHub)" <gi...@apache.org> on 2023/05/15 20:13:10 UTC

[GitHub] [arrow-rs] alexandreyc commented on a diff in pull request #4221: Add finish method to RecordBatchWriter trait

alexandreyc commented on code in PR #4221:
URL: https://github.com/apache/arrow-rs/pull/4221#discussion_r1194317057


##########
parquet/src/file/writer.rs:
##########
@@ -205,9 +205,10 @@ impl<W: Write> SerializedFileWriter<W> {
     }
 
     /// Closes and finalises file writer, returning the file metadata.
-    pub fn close(mut self) -> Result<parquet::FileMetaData> {
+    pub fn close(&mut self) -> Result<parquet::FileMetaData> {
         self.assert_previous_writer_closed()?;
         let metadata = self.write_metadata()?;
+        self.buf.flush()?;

Review Comment:
   This was not needed before because `flush` would be called when dropping.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org