divjotarora commented on code in PR #3773:
URL: https://github.com/apache/parquet-java/pull/3773#discussion_r3990815364
##########
parquet-column/src/main/java/org/apache/parquet/column/values/dictionary/DictionaryValuesReader.java:
##########
Review Comment:
`DictionaryValuesReader#initFromPage` has this code:
```
public void initFromPage(int valueCount, ByteBufferInputStream stream)
throws IOException {
this.in = stream.remainingStream();
if (in.available() > 0) {
LOG.debug("init from page at offset {} for length {}",
stream.position(), stream.available());
int bitWidth = BytesUtils.readIntLittleEndianOnOneByte(in);
LOG.debug("bit width {}", bitWidth);
decoder = new RunLengthBitPackingHybridDecoder(bitWidth, in);
} else {
decoder = new RunLengthBitPackingHybridDecoder(1, in) {
@Override
public int readInt() throws IOException {
throw new IOException("Attempt to read from empty page");
}
};
}
}
```
Specifically in the `else`, we create a special
`RunLengthBitPackingHybridDecoder` for empty dictionary pages. Should we
override that decoder's `skipInts` to preserve the same `IOException` behavior
when skipping? Otherwise, we bypass `readInt` and call `readNext` in the skip
path, which throws `IllegalArgumentException`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]