Skip to content

Commit

Permalink
Don't flush in the middle
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Dec 20, 2022
1 parent e2abb4b commit 32eb9af
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions parquet/src/file/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,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);
Expand Down Expand Up @@ -279,7 +278,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);
Expand Down Expand Up @@ -326,7 +324,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();

Expand Down Expand Up @@ -592,7 +589,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)
}
Expand Down Expand Up @@ -689,7 +685,6 @@ impl<'a, W: Write> PageWriter for SerializedPageWriter<'a, W> {
metadata
.to_column_metadata_thrift()
.write_to_out_protocol(&mut protocol)?;
protocol.flush()?;
Ok(())
}

Expand Down

0 comments on commit 32eb9af

Please sign in to comment.