You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by GitBox <gi...@apache.org> on 2021/04/22 15:57:38 UTC

[GitHub] [parquet-mr] shangxinli commented on a change in pull request #896: PARQUET-2027: Fix calculating directory offset for merge

shangxinli commented on a change in pull request #896:
URL: https://github.com/apache/parquet-mr/pull/896#discussion_r618529979



##########
File path: parquet-hadoop/src/main/java/org/apache/parquet/hadoop/Offsets.java
##########
@@ -68,12 +68,14 @@ public static Offsets getOffsets(SeekableInputStream input, ColumnChunkMetaData
     return new Offsets(firstDataPageOffset, dictionaryPageOffset);
   }
 
-  private static long readDictionaryPageSize(SeekableInputStream in, long pos) throws IOException {
+  private static long readDictionaryPageSize(SeekableInputStream in, ColumnChunkMetaData chunk) throws IOException {
     long origPos = -1;
     try {
       origPos = in.getPos();
+      in.seek(chunk.getStartingPos());

Review comment:
       Do we assume the dictionary page is always the chunk starting address? 




-- 
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:
users@infra.apache.org