abstractdog commented on code in PR #3773:
URL: https://github.com/apache/parquet-java/pull/3773#discussion_r4069035319
##########
parquet-column/src/main/java/org/apache/parquet/column/values/dictionary/DictionaryValuesReader.java:
##########
@@ -57,7 +59,21 @@ public void initFromPage(int valueCount,
ByteBufferInputStream stream) throws IO
decoder = new RunLengthBitPackingHybridDecoder(1, in) {
@Override
public int readInt() throws IOException {
- throw new IOException("Attempt to read from empty page");
+ throw new IOException(EMPTY_PAGE_MESSAGE);
+ }
+
+ /**
+ * Skipping goes through the decoder directly instead of {@link
#readInt()}, so it needs the
+ * same guard: without it, readNext() would hit the empty stream and
throw a raw
+ * IllegalArgumentException that {@link
DictionaryValuesReader#skip(int)} does not wrap.
+ * Skipping zero values reads nothing and stays silent, matching the
loop that
+ * {@link org.apache.parquet.column.values.ValuesReader#skip(int)}
used to run.
Review Comment:
agree, tend to take care of the same, missed this time:
https://github.com/apache/parquet-java/pull/3773/changes/80ecda728ef07446d1d0a3dcadacd5b730d1dc7c
--
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]