[
https://issues.apache.org/jira/browse/PARQUET-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538900#comment-17538900
]
ASF GitHub Bot commented on PARQUET-2148:
-----------------------------------------
ggershinsky commented on code in PR #969:
URL: https://github.com/apache/parquet-mr/pull/969#discussion_r876022965
##########
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:
with uniform encryption, we leverage the "encrypt_with_footer_key" mode in
parquet-format
> Enable uniform decryption with plaintext footer
> -----------------------------------------------
>
> Key: PARQUET-2148
> URL: https://issues.apache.org/jira/browse/PARQUET-2148
> Project: Parquet
> Issue Type: Bug
> Components: parquet-mr
> Reporter: Gidon Gershinsky
> Assignee: Gidon Gershinsky
> Priority: Major
> Fix For: 1.12.3
>
>
> Currently, uniform decryption is not enabled in the plaintext footer mode -
> for no good reason. Column metadata is available, we just need to decrypt and
> use it.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)