hcrosse opened a new pull request, #1743:
URL: https://github.com/apache/arrow-go/pull/1743

   ### Rationale for this change
   
   `GetColumnPageReader` issues a separate `ReadAt` for every projected column 
chunk, so reading a wide Parquet row group on object storage produces dozens of 
range GET requests per row group. `pqarrow` also lacked a way to coalesce 
column reads without pre-reading an entire file into memory.
   
   ### What changes are included in this PR?
   
   - Add `parquet.CacheOptions` (default 1 MiB hole limit, 32 MiB range limit, 
8 concurrent reads) and `(*file.Reader).PreBuffer` to plan lazy, per-row-group 
coalesced column-chunk reads.
   - Fetch each row group's merged ranges on first access with bounded 
concurrency, hand each column slice off once with one-shot eviction on 
consumption, short-circuit queued reads on error, and clear unconsumed plans on 
`Close`.
   - Validate column-chunk bounds against the known source file size (including 
legacy PARQUET-816 padding) before allocation.
   - Wire opt-in `PreBuffer` and `CacheOptions` on 
`pqarrow.ArrowReadProperties` into row-group-major record readers, leaving 
column-major table reads unchanged.
   
   Benchmarks on 64 columns by 4 row groups (Zstd, Apple M4 Max):
   
   | Mode | Base | PreBuffer | ReadAt/op |
   | --- | ---: | ---: | ---: |
   | Local (0 ms), `Parallel: false` | 11.08 ms | 11.07 ms | 256 to 4 |
   | Mock S3 (5 ms, 8 in-flight), `Parallel: false` | 1,603.9 ms | 36.5 ms 
(43.9x) | 256 to 4 |
   | Mock S3 (5 ms, 8 in-flight), `Parallel: true` | 197.3 ms | 30.9 ms (6.4x) 
| 256 to 4 |
   | Mock S3 sparse 8 cols, `Parallel: false` | 191.0 ms | 24.7 ms (7.7x) | 32 
to 4 |
   
   ### Are these changes tested?
   
   Yes. Added range-coalescing unit and fuzz tests, source-size bounds and 
legacy PARQUET-816 overlap checks, exact-EOF and concurrent error-propagation 
tests, `weak.Pointer` GC eviction tests, and end-to-end `pqarrow` tests across 
nested, map, encrypted, row-range, buffered-stream, and page-streaming readers 
under the race detector.
   
   ### Are there any user-facing changes?
   
   Yes. Adds opt-in `parquet.CacheOptions`, `(*file.Reader).PreBuffer`, and 
pre-buffering fields on `pqarrow.ArrowReadProperties` (disabled by default).
   


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

Reply via email to