Skip to content

Commit

Permalink
Minor tidy ups and test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreeve committed Mar 11, 2025
1 parent 07ad9dd commit f33c96c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions parquet/src/arrow/async_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ impl<T: AsyncRead + AsyncSeek + Unpin + Send> AsyncFileReader for T {
let mut buf = Vec::with_capacity(metadata_len);
self.take(metadata_len as _).read_to_end(&mut buf).await?;

let parquet_metadata_reader = ParquetMetaDataReader::decode_metadata(&buf)?;
Ok(Arc::new(parquet_metadata_reader))
Ok(Arc::new(ParquetMetaDataReader::decode_metadata(&buf)?))
}
.boxed()
}
Expand Down
6 changes: 4 additions & 2 deletions parquet/src/file/metadata/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ impl ParquetMetaDataReader {
/// file. The format of `buf` is the Thrift compact binary protocol, as specified
/// by the [Parquet Spec].
///
/// This method handles using either decode_footer of
/// This method handles using either decode_footer or
/// decode_metadata_with_encryption depending on whether the encryption
/// feature is enabled.
///
Expand All @@ -698,7 +698,9 @@ impl ParquetMetaDataReader {
#[cfg(not(feature = "encryption"))]
let result = {
if footer_tail.is_encrypted_footer() {
Err(general_err!("Parquet error: Parquet file has an encrypted footer but the encryption feature is disabled"))
Err(general_err!(
"Parquet file has an encrypted footer but the encryption feature is disabled"
))
} else {
Self::decode_metadata(buf)
}
Expand Down

0 comments on commit f33c96c

Please sign in to comment.