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/10/04 09:03:46 UTC
[GitHub] [parquet-mr] gszadovszky commented on a change in pull request #928: PARQUET-2081: Encryption translation tool - Parquet-hadoop
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: dev-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org