Skip to content

Commit

Permalink
Update cpp/src/parquet/column_reader.cc
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine Pitrou <[email protected]>
  • Loading branch information
mapleFU and pitrou authored Jan 20, 2025
1 parent 7714719 commit 0f11608
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpp/src/parquet/column_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,10 @@ std::shared_ptr<Buffer> SerializedPageReader::DecompressIfNeeded(
memcpy(decompressed, page_buffer->data(), levels_byte_len);
}

// GH-31992: DataPageV2 may store only levels and no values
// when all values are null. In this case, we can avoid decompressing
// the rest of the page.
// GH-31992: DataPageV2 may store only levels and no values when all
// values are null. In this case, Parquet java is known to produce a
// 0-len compressed area (which is invalid compressed input).
// See https://github.com/apache/parquet-java/issues/3122
int64_t decompressed_len = 0;
if (uncompressed_len - levels_byte_len != 0) {
// Decompress the values
Expand Down

0 comments on commit 0f11608

Please sign in to comment.