ggershinsky commented on a change in pull request #776:
URL: https://github.com/apache/parquet-mr/pull/776#discussion_r427932476
##########
File path: parquet-hadoop/src/main/java/org/apache/parquet/crypto/AesCipher.java
##########
@@ -68,19 +67,32 @@
public static byte[] createModuleAAD(byte[] fileAAD, ModuleType moduleType,
short rowGroupOrdinal, short columnOrdinal, short pageOrdinal) {
Review comment:
Thanks for the value checking tip, I'll update the code to use it. As
for a centralization - I think this function (`createModuleAAD`) is the right
place. In the encryption feature, ordinals are used only for integrity
verification - performed via AADs, which are calculated here for both
encryption and decryption. Everywhere in the code, the ordinals will be an
`int`. Since the `createModuleAAD` is called only for encrypted files, an
exception will be thrown only for them (if an ordinal exceeds the
`Short.MAX_VALUE`).
----------------------------------------------------------------
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:
[email protected]