wgtmac commented on code in PR #44043:
URL: https://github.com/apache/arrow/pull/44043#discussion_r1913330190
##########
cpp/src/parquet/file_reader.cc:
##########
@@ -266,13 +266,17 @@ class SerializedRowGroup : public
RowGroupReader::Contents {
ARROW_DCHECK_NE(meta_decryptor, nullptr);
ARROW_DCHECK_NE(data_decryptor, nullptr);
- constexpr auto kEncryptedRowGroupsLimit = 32767;
- if (i > kEncryptedRowGroupsLimit) {
+ constexpr auto kEncryptedOrdinalLimit = 32767;
+ if (ARROW_PREDICT_FALSE(row_group_ordinal_ > kEncryptedOrdinalLimit)) {
Review Comment:
It seems that if we don't request reading data from `row_group_ordinal >
32767` and `column_ordinal > 32767`, we will even not notice that it is a
malformed encrypted file.
##########
cpp/src/parquet/file_reader.cc:
##########
@@ -266,13 +266,17 @@ class SerializedRowGroup : public
RowGroupReader::Contents {
ARROW_DCHECK_NE(meta_decryptor, nullptr);
ARROW_DCHECK_NE(data_decryptor, nullptr);
- constexpr auto kEncryptedRowGroupsLimit = 32767;
- if (i > kEncryptedRowGroupsLimit) {
+ constexpr auto kEncryptedOrdinalLimit = 32767;
+ if (ARROW_PREDICT_FALSE(row_group_ordinal_ > kEncryptedOrdinalLimit)) {
Review Comment:
I am wondering if this is the best place to enforce this. Is it possible to
check these while creating the `FileMetaData` if encrypted?
--
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]