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 2023/01/18 12:48:08 UTC

[arrow-rs] branch master updated: parquet:: avoid reading extra 8 bytes (#3550)

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 96831de82 parquet:: avoid reading extra 8 bytes (#3550)
96831de82 is described below

commit 96831de828bcca5e6240c4d5dd5ddb1a1ea778e9
Author: sachin agarwal <as...@gmail.com>
AuthorDate: Wed Jan 18 18:18:03 2023 +0530

    parquet:: avoid reading extra 8 bytes (#3550)
    
    * parquet:: avoid reading extra 8 bytes
    
    Effect in increasing performance
    
    * Update parquet/src/arrow/async_reader/mod.rs
    
    Co-authored-by: Raphael Taylor-Davies <17...@users.noreply.github.com>
    
    * Update mod.rs
    
    Co-authored-by: Raphael Taylor-Davies <17...@users.noreply.github.com>
---
 parquet/src/arrow/async_reader/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parquet/src/arrow/async_reader/mod.rs b/parquet/src/arrow/async_reader/mod.rs
index e93c85580..64b334fd4 100644
--- a/parquet/src/arrow/async_reader/mod.rs
+++ b/parquet/src/arrow/async_reader/mod.rs
@@ -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)?))
         }