rok commented on code in PR #39438:
URL: https://github.com/apache/arrow/pull/39438#discussion_r1594608264


##########
python/pyarrow/_dataset_parquet.pyx:
##########
@@ -127,8 +127,14 @@ cdef class ParquetFileFormat(FileFormat):
                             'instance of ParquetReadOptions')
 
         if default_fragment_scan_options is None:
-            default_fragment_scan_options = ParquetFragmentScanOptions(
-                **scan_args)
+            # remove decryption_properties from scan_args as it does not take 
this parameter
+            decryption_properties = scan_args.pop('decryption_properties', 
None)
+            default_fragment_scan_options = 
ParquetFragmentScanOptions(**scan_args)
+            # make sure scan options has decryption properties
+            if decryption_properties is not None:
+                default_fragment_scan_options.set_file_decryption_properties(
+                    decryption_properties)
+
         elif isinstance(default_fragment_scan_options, dict):

Review Comment:
   Good point. Refactored.



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