RussellSpitzer commented on code in PR #3935:
URL: https://github.com/apache/parquet-java/pull/3935#discussion_r4554474541
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ColumnChunkPageWriteStore.java:
##########
@@ -319,7 +319,13 @@ public void writePageV2(
}
if (null != pageBlockEncryptor) {
AesCipher.quickUpdatePageAAD(dataPageAAD, pageOrdinal);
- compressedData =
BytesInput.from(pageBlockEncryptor.encrypt(compressedData.toByteArray(),
dataPageAAD));
+ // The levels are encrypted with the values as one module, which is
written in place of all three
+ compressedData = BytesInput.from(pageBlockEncryptor.encrypt(
+ BytesInput.concat(repetitionLevels, definitionLevels,
compressedData)
+ .toByteArray(),
+ dataPageAAD));
+ repetitionLevels = BytesInput.empty();
Review Comment:
Probably for a later refactor, but I couldn't find a better shape here. We
can basically rewrite a lot of this code or we can just null out rep and def
levels and only use compressedData.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]