peter-toth opened a new pull request, #3599:
URL: https://github.com/apache/parquet-java/pull/3599

   ### Rationale for this change
   
   This PR is based on @mbutrovich's previous work.
   
   Opening up APIs needed by a later materialization feature in Spark. External 
readers (e.g. a Spark-side scanner) need (a) the column-index-derived row 
ranges that may pass the configured filter for a row group, and (b) a 
metadata-only estimate of the on-disk compressed bytes those ranges correspond 
to for the currently requested columns, so they can plan I/O without reading 
column data.
   
   ### What changes are included in this PR?
   
   - `getRowRanges(int blockIndex)`: made public; returns row ranges that may 
pass the configured filter. With no filter, shortcuts to all rows of the row 
group.
   - `getCompressedBytesForRowRanges(int blockIndex, RowRanges rowRanges)`: 
metadata-only sum of compressed page sizes for the reader's currently requested 
columns whose pages overlap the given row ranges. Dictionary pages are not 
represented in OffsetIndex and are therefore excluded.
   
   ### Are these changes tested?
   
   Yes. `TestParquetFileReaderRowRanges` covers: no-filter row ranges cover all 
rows, empty ranges short-circuit to 0, full ranges equal the per-page 
OffsetIndex sum and are strictly less than the column-chunk total (proving 
dictionary-page exclusion), and partial ranges fall between 0 and the full 
total.
   
   ### Are there any user-facing changes?
   
   No.
   
   Closes #3598
   


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