wgtmac commented on code in PR #15182:
URL: https://github.com/apache/arrow/pull/15182#discussion_r1063048055


##########
cpp/src/parquet/encryption/encryption_internal.cc:
##########
@@ -599,7 +599,13 @@ static std::string ShortToBytesLe(int16_t input) {
 
 std::string CreateModuleAad(const std::string& file_aad, int8_t module_type,
                             int16_t row_group_ordinal, int16_t column_ordinal,
-                            int16_t page_ordinal) {
+                            int32_t page_ordinal) {
+  if (ARROW_PREDICT_FALSE(page_ordinal > std::numeric_limits<int16_t>::max())) 
{

Review Comment:
   I'd suggest explicitly explain that it is the restriction by AAD suffix of 
page ordinal: 
https://github.com/apache/parquet-format/blob/master/Encryption.md#442-aad-suffix
 



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

Reply via email to