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


##########
parquet/src/arrow/async_reader/mod.rs:
##########
@@ -2336,4 +2494,245 @@ mod tests {
         let result = reader.try_collect::<Vec<_>>().await.unwrap();
         assert_eq!(result.len(), 1);
     }
+
+    #[tokio::test]
+    #[cfg(feature = "encryption")]
+    async fn test_non_uniform_encryption_plaintext_footer() {
+        let testdata = arrow::util::test_util::parquet_test_data();
+        let path = 
format!("{testdata}/encrypt_columns_plaintext_footer.parquet.encrypted");
+        let mut file = File::open(&path).await.unwrap();
+
+        // There is always a footer key even with a plaintext footer,
+        // but this is used for signing the footer.
+        let footer_key = "0123456789012345".as_bytes().to_vec(); // 128bit/16
+        let column_1_key = "1234567890123450".as_bytes().to_vec();
+        let column_2_key = "1234567890123451".as_bytes().to_vec();
+
+        let decryption_properties = 
FileDecryptionProperties::builder(footer_key)
+            .with_column_key("double_field", column_1_key)
+            .with_column_key("float_field", column_2_key)
+            .build()
+            .unwrap();
+
+        let _ = verify_encryption_test_file_read_async(&mut file, 
decryption_properties).await;

Review Comment:
   One more thing I just noticed, these async tests never check that the result 
is Ok, this should probably be:
   ```suggestion
           verify_encryption_test_file_read_async(&mut file, 
decryption_properties).await.unwrap();
   ```
   (and similarly for the other tests)



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to