Github user SongYadong commented on a diff in the pull request:
https://github.com/apache/spark/pull/22348#discussion_r215870108
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedParquetRecordReader.java
---
@@ -154,8 +159,6 @@ public void close() throws IOException {
@Override
public boolean nextKeyValue() throws IOException {
- resultBatch();
--- End diff --
Thanks for your review.
calling sequence is optional. `initBatch()` was moved to `nextBatch()`, if
`hasNext()` called before `initBatch()`, eventually `initBatch()` will be
called first of all in `nextBatch()`:
```
public boolean nextBatch() throws IOException {
if (columnarBatch == null) initBatch();
```
Orc has a much simple way:
```
public boolean nextKeyValue() throws IOException {
return nextBatch();
}
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]