samarthjain commented on a change in pull request #2749:
URL: https://github.com/apache/iceberg/pull/2749#discussion_r660293425
##########
File path:
parquet/src/main/java/org/apache/iceberg/parquet/BasePageIterator.java
##########
@@ -77,7 +77,8 @@ protected void reset() {
protected abstract void initDefinitionLevelsReader(DataPageV1 dataPageV1,
ColumnDescriptor descriptor,
ByteBufferInputStream in,
int count) throws IOException;
- protected abstract void initDefinitionLevelsReader(DataPageV2 dataPageV2,
ColumnDescriptor descriptor);
+ protected abstract void initDefinitionLevelsReader(DataPageV2 dataPageV2,
ColumnDescriptor descriptor)
+ throws IOException;
Review comment:
Calling `dataPageV2.getDefinitionLevels.toInputStream()` below throws an
IOException.
```
@Override
protected void initDefinitionLevelsReader(DataPageV2 dataPageV2,
ColumnDescriptor desc) throws IOException {
int bitWidth =
BytesUtils.getWidthFromMaxInt(desc.getMaxDefinitionLevel());
// do not read the length from the stream. v2 pages handle dividing the
page bytes.
this.vectorizedDefinitionLevelReader = new
VectorizedParquetDefinitionLevelReader(bitWidth,
desc.getMaxDefinitionLevel(), false, setArrowValidityVector);
this.vectorizedDefinitionLevelReader.initFromPage(
dataPageV2.getValueCount(),
dataPageV2.getDefinitionLevels().toInputStream());
}
```
--
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]