adamreeve commented on code in PR #7342:
URL: https://github.com/apache/arrow-rs/pull/7342#discussion_r2020324846


##########
parquet/src/arrow/async_reader/mod.rs:
##########
@@ -172,37 +159,14 @@ impl<T: AsyncRead + AsyncSeek + Unpin + Send> 
AsyncFileReader for T {
 
             let footer = ParquetMetaDataReader::decode_footer_tail(&buf)?;
             let metadata_len = footer.metadata_length();
-            self.seek(SeekFrom::End(-FOOTER_SIZE_I64 - metadata_len as i64))
-                .await?;
-
-            let mut buf = Vec::with_capacity(metadata_len);
-            self.take(metadata_len as _).read_to_end(&mut buf).await?;
-
-            let metadata_reader = ParquetMetaDataReader::new();
-
             #[cfg(feature = "encryption")]
-            let metadata_reader = metadata_reader
-                
.with_decryption_properties(options.file_decryption_properties.as_ref());
+            let have_decryptor = options.is_some() &&

Review Comment:
   `decode_footer_metadata` does handle None, although the naming might make 
this a bit confusing. It calls `decode_metadata_with_encryption`, which takes 
an `Option<&FileDecryptionProperties>`, and will hit this error if the footer 
is encrypted and the decryption properties are not set: 
https://github.com/adamreeve/arrow-rs/blob/2158f314a784c37b5e61aaab1dec0437c3ebc0cb/parquet/src/file/metadata/reader.rs#L754
   
   There is a test that covers this scenario: 
https://github.com/adamreeve/arrow-rs/blob/6615e27485fd37b2b20451d05de27eec67652f1a/parquet/tests/arrow_reader/encryption_async.rs#L232



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to