sudssf commented on a change in pull request #1474:
URL: https://github.com/apache/iceberg/pull/1474#discussion_r490623914
##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ReadConf.java
##########
@@ -166,17 +167,22 @@ ParquetFileReader reader() {
}
private Map<Long, Long> generateOffsetToStartPos() {
- ParquetFileReader fileReader = newReader(this.file,
ParquetReadOptions.builder().build());
- Map<Long, Long> offsetToStartPos = new HashMap<>();
- long curRowCount = 0;
- for (int i = 0; i < fileReader.getRowGroups().size(); i += 1) {
- BlockMetaData meta = fileReader.getRowGroups().get(i);
- offsetToStartPos.put(meta.getStartingPos(), curRowCount);
- curRowCount += meta.getRowCount();
- }
+ try (ParquetFileReader fileReader = newReader(file,
ParquetReadOptions.builder().build())) {
+ Map<Long, Long> offsetToStartPos = new HashMap<>();
Review comment:
Maps.newHashMap() was not auto resolved by imports so going to use
default constructor
----------------------------------------------------------------
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]