You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by tu...@apache.org on 2022/12/20 17:52:23 UTC
[arrow-rs] branch master updated: Don't flush in the middle (#3374)
This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new c1c97f134 Don't flush in the middle (#3374)
c1c97f134 is described below
commit c1c97f1344abce3437868e66b6453e1580241c30
Author: Liang-Chi Hsieh <vi...@gmail.com>
AuthorDate: Tue Dec 20 09:52:17 2022 -0800
Don't flush in the middle (#3374)
---
parquet/src/file/writer.rs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/parquet/src/file/writer.rs b/parquet/src/file/writer.rs
index 2d879be80..66b5d8e23 100644
--- a/parquet/src/file/writer.rs
+++ b/parquet/src/file/writer.rs
@@ -23,7 +23,7 @@ use crate::format as parquet;
use crate::format::{ColumnIndex, OffsetIndex, RowGroup};
use std::io::{BufWriter, IoSlice};
use std::{io::Write, sync::Arc};
-use thrift::protocol::{TCompactOutputProtocol, TOutputProtocol, TSerializable};
+use thrift::protocol::{TCompactOutputProtocol, TSerializable};
use crate::basic::PageType;
use crate::column::writer::{
@@ -230,7 +230,6 @@ impl<W: Write> SerializedFileWriter<W> {
let start_offset = self.buf.bytes_written();
let mut protocol = TCompactOutputProtocol::new(&mut self.buf);
offset_index.write_to_out_protocol(&mut protocol)?;
- protocol.flush()?;
let end_offset = self.buf.bytes_written();
// set offset and index for offset index
column_metadata.offset_index_offset = Some(start_offset as i64);
@@ -282,7 +281,6 @@ impl<W: Write> SerializedFileWriter<W> {
let start_offset = self.buf.bytes_written();
let mut protocol = TCompactOutputProtocol::new(&mut self.buf);
column_index.write_to_out_protocol(&mut protocol)?;
- protocol.flush()?;
let end_offset = self.buf.bytes_written();
// set offset and index for offset index
column_metadata.column_index_offset = Some(start_offset as i64);
@@ -335,7 +333,6 @@ impl<W: Write> SerializedFileWriter<W> {
{
let mut protocol = TCompactOutputProtocol::new(&mut self.buf);
file_metadata.write_to_out_protocol(&mut protocol)?;
- protocol.flush()?;
}
let end_pos = self.buf.bytes_written();
@@ -605,7 +602,6 @@ impl<'a, W: Write> SerializedPageWriter<'a, W> {
{
let mut protocol = TCompactOutputProtocol::new(&mut self.sink);
header.write_to_out_protocol(&mut protocol)?;
- protocol.flush()?;
}
Ok(self.sink.bytes_written() - start_pos)
}
@@ -702,7 +698,6 @@ impl<'a, W: Write> PageWriter for SerializedPageWriter<'a, W> {
metadata
.to_column_metadata_thrift()
.write_to_out_protocol(&mut protocol)?;
- protocol.flush()?;
Ok(())
}