mapleFU commented on code in PR #41346:
URL: https://github.com/apache/arrow/pull/41346#discussion_r1593432681


##########
cpp/src/parquet/column_reader.cc:
##########
@@ -1117,11 +1124,10 @@ int64_t TypedColumnReaderImpl<DType>::ReadBatch(int64_t 
batch_size, int16_t* def
   int64_t num_def_levels = 0;
   int64_t values_to_read = 0;
   ReadLevels(batch_size, def_levels, rep_levels, &num_def_levels, 
&values_to_read);
-
   *values_read = this->ReadValues(values_to_read, values);
+  ARROW_DCHECK_GE(values_to_read, *values_read);

Review Comment:
   Oh-no, we cannot...If `values_read` is too less, it might be a corrupt file, 
but when `values_to_read < *values_read`, `ReadValues` returns too many...



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