peter-toth commented on code in PR #3599:
URL: https://github.com/apache/parquet-java/pull/3599#discussion_r3373128050


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java:
##########
@@ -1504,6 +1518,46 @@ private RowRanges getRowRanges(int blockIndex) {
     return rowRanges;
   }
 
+  /**
+   * Returns the total compressed byte count of this reader's requested 
columns' pages whose
+   * row ranges intersect {@code rowRanges} within the given row group. The 
set of columns is
+   * taken from the reader's currently configured requested schema (see
+   * {@link #setRequestedSchema}). Metadata-only: consults each column's 
{@link OffsetIndex}
+   * from the file footer; no column data is read.
+   *
+   * <p>Page size here is {@link OffsetIndex#getCompressedPageSize} (includes 
page header).
+   * Dictionary pages are not represented in {@link OffsetIndex} and are 
therefore excluded
+   * from the sum.
+   *
+   * @param blockIndex row group index
+   * @param rowRanges  row ranges to intersect against pages
+   * @return sum of compressed page sizes across requested columns for pages 
overlapping
+   *         {@code rowRanges}
+   * @throws ColumnIndexStore.MissingOffsetIndexException if any requested 
column lacks an
+   *         offset index
+   */
+  public long getCompressedBytesForRowRanges(int blockIndex, RowRanges 
rowRanges) {

Review Comment:
   @wgtmac, I can move this part to Spark.
   What your take on the `getRowRanges()` change in this PR and the 
[other](https://github.com/apache/parquet-java/pull/3597) PR? Shall I combine 
them into one?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to