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


##########
cpp/src/parquet/column_reader.cc:
##########
@@ -191,12 +190,9 @@ int LevelDecoder::Decode(int batch_size, int16_t* levels) {
   const int num_values = std::min(num_values_remaining_, batch_size);
   const int num_decoded = impl_->GetBatch(levels, num_values);
   if (num_decoded > 0) {
-    internal::MinMax min_max = internal::FindMinMax(levels, num_decoded);
-    if (ARROW_PREDICT_FALSE(min_max.min < 0 || min_max.max > max_level_)) {
-      std::stringstream ss;
-      ss << "Malformed levels. min: " << min_max.min << " max: " << min_max.max
-         << " out of range.  Max Level: " << max_level_;
-      throw ParquetException(ss.str());
+    if (levels[0] < 0 || levels[0] > max_level_ ||

Review Comment:
   I don't think this is correct. We know nothing about whether these values 
are encoded in RLE or bit-packing under the hood so we cannot simply assume its 
data distribution.



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