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


##########
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:
   So, looking at the suggestion commit I think it may not work. The problem 
here is that after the change we now have 4 execution paths.
   1. feature="encryption" + options = Some(&ArrowReaderOptions)
   2. feature="encryption" + options = None, looks like the commit does not 
handle
   3. feature!="encryption" + options = Some(&ArrowReaderOptions)
   4. feature!="encryption" + options = None
   
   I think the problem is that decode_footer_metadata does not handle None for 
file_decryption_properties (and also this property is not present when 
feature!="encryption"  which only shows up under some test configurations).



-- 
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