gszadovszky commented on a change in pull request #776: URL: https://github.com/apache/parquet-mr/pull/776#discussion_r428537220
########## File path: parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java ########## @@ -705,22 +797,39 @@ public ParquetFileReader(Configuration conf, Path file, ParquetMetadata footer) paths.put(ColumnPath.get(col.getPath()), col); } this.crc = options.usePageChecksumVerification() ? new CRC32() : null; + this.fileDecryptor = fileMetaData.getFileDecryptor(); } public ParquetFileReader(InputFile file, ParquetReadOptions options) throws IOException { + this(file, options, null); + } + + public ParquetFileReader(InputFile file, ParquetReadOptions options, + FileDecryptionProperties fileDecryptionProperties) throws IOException { this.converter = new ParquetMetadataConverter(options); this.file = file; this.f = file.newStream(); this.options = options; + if ((null == fileDecryptionProperties) && (file instanceof HadoopInputFile)) { + HadoopInputFile hadoopFile = (HadoopInputFile) file; + fileDecryptionProperties = getDecryptionProperties(hadoopFile.getPath(), hadoopFile.getConfiguration()); Review comment: `ParquetReadOptions` was created to carry all the required properties for reading a parquet file. If the `Path` is necessary for the decryption then we might add it to the options as well. If we decide to not to add it still, I would use the options object to carry any other decryption properties. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org