shangxinli commented on code in PR #969: URL: https://github.com/apache/parquet-mr/pull/969#discussion_r876012014
########## parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java: ########## @@ -1556,25 +1558,32 @@ public ParquetMetadata fromParquetMetadata(FileMetaData parquetMetadata, } else { // Encrypted column boolean encryptedWithFooterKey = cryptoMetaData.isSetENCRYPTION_WITH_FOOTER_KEY(); if (encryptedWithFooterKey) { // Column encrypted with footer key - if (!encryptedFooter) { - throw new ParquetCryptoRuntimeException("Column encrypted with footer key in file with plaintext footer"); + if (null == fileDecryptor) { + throw new ParquetCryptoRuntimeException("Column encrypted with footer key: No keys available"); } if (null == metaData) { throw new ParquetCryptoRuntimeException("ColumnMetaData not set in Encryption with Footer key"); } - if (null == fileDecryptor) { - throw new ParquetCryptoRuntimeException("Column encrypted with footer key: No keys available"); - } columnPath = getPath(metaData); + if (!encryptedFooter) { // Unencrypted footer. Decrypt full column metadata, using footer key Review Comment: I am not following why we use the footer key to decrypt? Wasn't the column key used before? -- 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: dev-unsubscr...@parquet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org