ggershinsky commented on code in PR #969:
URL: https://github.com/apache/parquet-mr/pull/969#discussion_r876028764


##########
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:
   this already works ok with encrypted footers; now fixing for plaintext 
footers.



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

Reply via email to