cloud-fan commented on a change in pull request #33006:
URL: https://github.com/apache/spark/pull/33006#discussion_r655899492
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedRleValuesReader.java
##########
@@ -199,48 +200,51 @@ public void readBatch(
break;
}
offset += n;
- left -= n;
currentCount -= n;
}
+
+ state.advanceOffset(offset);
}
/**
* Decoding for dictionary ids. The IDs are populated into `values` and the
nullability is
* populated into `nulls`.
*/
public void readIntegers(
- int total,
+ ParquetReadState state,
WritableColumnVector values,
WritableColumnVector nulls,
- int rowId,
- int level,
VectorizedValuesReader data) throws IOException {
- int left = total;
- while (left > 0) {
+ int offset = state.offset;
+
+ while (state.hasMoreInPage(offset)) {
Review comment:
e.g.
```
int offset = state.offset;
int left = Math.min(state.valuesToReadInPage, state. valuesToReadInBatch)
while (left > 0) {
...
offset += n;
left -= n;
}
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]