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]