Skip to content

Commit

Permalink
parquet:: avoid reading extra 8 bytes (#3550)
Browse files Browse the repository at this point in the history
* parquet:: avoid reading extra 8 bytes

Effect in increasing performance

* Update parquet/src/arrow/async_reader/mod.rs

Co-authored-by: Raphael Taylor-Davies <[email protected]>

* Update mod.rs

Co-authored-by: Raphael Taylor-Davies <[email protected]>
  • Loading branch information
Sach1nAgarwal and tustvold authored Jan 18, 2023
1 parent 14545a4 commit 96831de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parquet/src/arrow/async_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl<T: AsyncRead + AsyncSeek + Unpin + Send> AsyncFileReader for T {
.await?;

let mut buf = Vec::with_capacity(metadata_len);
self.read_to_end(&mut buf).await?;
self.take(metadata_len as _).read_to_end(&mut buf).await?;

Ok(Arc::new(decode_metadata(&buf)?))
}
Expand Down

0 comments on commit 96831de

Please sign in to comment.