MartinNowak commented on code in PR #46347:
URL: https://github.com/apache/arrow/pull/46347#discussion_r2079186887


##########
python/pyarrow/tests/parquet/test_encryption.py:
##########
@@ -133,6 +133,32 @@ def test_encrypted_parquet_write_read(tempdir, data_table):
     assert data_table.equals(result_table)
 
 
+def test_uniform_encrypted_parquet_write_read(tempdir, data_table):
+    """Write an encrypted parquet, verify it's encrypted, and then read it."""
+    path = tempdir / PARQUET_NAME
+
+    # Encrypt the footer and all columns with the footer key,
+    encryption_config = pe.EncryptionConfiguration(
+        footer_key=FOOTER_KEY_NAME,
+        uniform_encryption=True,
+        encryption_algorithm="AES_GCM_V1",
+        cache_lifetime=timedelta(minutes=5.0),
+        data_key_length_bits=256)
+
+    kms_connection_config, crypto_factory = write_encrypted_file(
+        path, data_table, FOOTER_KEY_NAME, COL_KEY_NAME, FOOTER_KEY, b"",
+        encryption_config)

Review Comment:
   I followed a test below 
   
https://github.com/apache/arrow/blob/b78e6e27ac0984fd368c86065261fdb2efa6054e/python/pyarrow/tests/parquet/test_encryption.py#L265-L267
 and it seems indeed clearer to pass the name instead of e.g. `None` to ensure 
that the key is really not used.
   
https://github.com/apache/arrow/blob/b78e6e27ac0984fd368c86065261fdb2efa6054e/python/pyarrow/tests/parquet/test_encryption.py#L84-L93



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