pitrou commented on a change in pull request #12532:
URL: https://github.com/apache/arrow/pull/12532#discussion_r818697820



##########
File path: cpp/src/parquet/file_reader.cc
##########
@@ -146,6 +146,10 @@ ::arrow::io::ReadRange 
ComputeColumnChunkRange(FileMetaData* file_metadata,
 
   int64_t col_length = column_metadata->total_compressed_size();
   int64_t col_end;
+  if (col_start < 0 || col_length < 0) {
+    throw ParquetException("Invalid column metadata (corrupt file?)");

Review comment:
       I don't think that'd be useful. They are unlikely to arise of a 
programming error in the writer (how do you get a negative length or file 
offset?).




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