Skip to content

Commit

Permalink
PARQUET-2443: Simplify ColumnChunkPageReader
Browse files Browse the repository at this point in the history
  • Loading branch information
clairemcginty committed Mar 6, 2024
1 parent 94e4726 commit 2cabc3b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 350 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,8 @@ void writeValue() {
} else {
this.dictionary = null;
}
if (pageReader.isFullyMaterialized()) {
if (pageReader.getTotalValueCount() <= 0) {
throw new ParquetDecodingException("totalValueCount '" + pageReader.getTotalValueCount() + "' <= 0");
}
if (pageReader.isFullyMaterialized() && pageReader.getTotalValueCount() <= 0) {
throw new ParquetDecodingException("totalValueCount '" + pageReader.getTotalValueCount() + "' <= 0");
}
}

Expand Down Expand Up @@ -601,7 +599,9 @@ public void readValue() {
+ "%d, definition level: %d",
path,
readValues,
pageReader.isFullyMaterialized() ? pageReader.getTotalValueCount() : -1,
pageReader.isFullyMaterialized()
? pageReader.getTotalValueCount()
: -1, // @Todo print something else?
readValues - (endOfPageValueCount - pageValueCount),
pageValueCount,
repetitionLevel,
Expand All @@ -615,7 +615,9 @@ public void readValue() {
+ "%d, definition level: %d",
path,
readValues,
pageReader.isFullyMaterialized() ? pageReader.getTotalValueCount() : -1,
pageReader.isFullyMaterialized()
? pageReader.getTotalValueCount()
: -1, // @Todo print something else?
readValues - (endOfPageValueCount - pageValueCount),
pageValueCount,
repetitionLevel,
Expand Down
Loading

0 comments on commit 2cabc3b

Please sign in to comment.