mapleFU commented on code in PR #15182:
URL: https://github.com/apache/arrow/pull/15182#discussion_r1063069292
##########
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:
Okay. The standard seems to be ambiguous. The format doesn't says that `page
cannot larger than i16`. But AAD requires it. I follow the implemention in
parquet-mr: If the page not use AAD, larger than i16 is ok. Otherwise, we
cannot use it.
By the way, seems compiler flag not use `no-narrowing`, which may cause some
possible narrow-cast issue.
--
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]