[ 
https://issues.apache.org/jira/browse/PARQUET-2081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17423849#comment-17423849
 ] 

ASF GitHub Bot commented on PARQUET-2081:
-----------------------------------------

gszadovszky commented on a change in pull request #928:
URL: https://github.com/apache/parquet-mr/pull/928#discussion_r721165920



##########
File path: 
parquet-column/src/main/java/org/apache/parquet/internal/column/columnindex/OffsetIndexBuilder.java
##########
@@ -151,22 +151,36 @@ public OffsetIndex build() {
     return build(0);
   }
 
+  public OffsetIndexBuilder fromOffsetIndex(OffsetIndex offsetIndex) {
+    assert offsetIndex instanceof OffsetIndexImpl;
+    OffsetIndexImpl offsetIndexImpl = (OffsetIndexImpl) offsetIndex;
+    this.offsets.addAll(new LongArrayList(offsetIndexImpl.offsets));
+    this.compressedPageSizes.addAll(new 
IntArrayList(offsetIndexImpl.compressedPageSizes));
+    this.firstRowIndexes.addAll(new 
LongArrayList(offsetIndexImpl.firstRowIndexes));
+    this.previousOffset = 0;
+    this.previousPageSize = 0;
+    this.previousRowIndex = 0;
+    this.previousRowCount  = 0;
+
+    return this;
+  }
+
   /**
    * Builds the offset index. Used by the writers to building up {@link 
OffsetIndex} objects to be
    * written to the Parquet file.
    *
-   * @param firstPageOffset
+   * @param shift
    *          the actual offset in the file to be used to translate all the 
collected offsets

Review comment:
       Since you renamed the argument I think the related description should 
also be rewritten. 




-- 
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]


> Encryption translation tool - Parquet-hadoop
> --------------------------------------------
>
>                 Key: PARQUET-2081
>                 URL: https://issues.apache.org/jira/browse/PARQUET-2081
>             Project: Parquet
>          Issue Type: Task
>          Components: parquet-mr
>            Reporter: Xinli Shang
>            Priority: Major
>             Fix For: 1.13.0
>
>
> This is the implement the core part of the Encryption translation tool in 
> parquet-hadoop. After this, we will have another Jira/PR for parquet-cli to 
> integrate with key tools for encryption properties.. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to