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