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

   ### Rationale for this change
   
   `ArrowReadProperties.Parallel` is binary: callers choose either serial 
column reads or one goroutine per column. When an application already runs 
multiple Parquet readers concurrently across worker goroutines, uncapped 
per-column fan-out multiplies transient decompression and builder buffers 
across workers and columns.
   
   ### What changes are included in this PR?
   
   Add an optional `MaxConcurrency` field to `pqarrow.ArrowReadProperties` that 
caps concurrent column reads and decodes per read operation when `Parallel` is 
true:
   
   - `MaxConcurrency <= 0` keeps the existing uncapped behavior.
   - `MaxConcurrency == 1` takes the serial path with no worker goroutines.
   - `MaxConcurrency > 1` caps active column work across field-reader setup, 
record-batch reads, seeks, and row-group reads, running nested struct children 
serially once an outer level fans out while passing the full budget through 
single-child wrappers.
   
   On a 4-worker, 64-column Zstd scan (65,536 rows, 4 row groups), 
`MaxConcurrency: 4` ran 16.7% faster (183.6 ms vs 220.5 ms) with 91 MiB lower 
peak RSS than uncapped `Parallel: true`, with no regression on existing 
benchmarks when `MaxConcurrency` is zero.
   
   ### Are these changes tested?
   
   Yes. Added race-checked unit tests covering flat schemas, nested structs, 
lists and maps of structs, row-range seeks, and error cancellation when 
`MaxConcurrency` is smaller than the column count, with checked-allocator leak 
assertions.
   
   ### Are there any user-facing changes?
   
   Yes. `pqarrow.ArrowReadProperties` gains an optional `MaxConcurrency int` 
field (zero preserves existing behavior).
   


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