Copilot commented on code in PR #1742:
URL: https://github.com/apache/arrow-go/pull/1742#discussion_r4810732314


##########
parquet/pqarrow/file_reader.go:
##########
@@ -675,7 +677,8 @@ func (fr *FileReader) getReader(ctx context.Context, field 
*SchemaField, arrowFi
                childReaders := make([]*ColumnReader, len(field.Children))
                childFields := make([]arrow.Field, len(field.Children))
 
-               if !fr.Props.Parallel {
+               conc := rctx.props.columnConcurrency(len(field.Children))

Review Comment:
   Count selected child subtrees before deciding to fan out. For a schema 
`root: struct<nested: struct<12 leaves>, skipped: int32>`, projecting only 
`root.nested.*` still gives `len(field.Children) == 2`. The parallel setup 
consequently assigns `MaxConcurrency = 1` to `nested`, although `skipped` 
returns nil without reading anything. After pruning, `root` has just one child, 
but batch reads and seeks remain entirely serial even with `MaxConcurrency: 3`. 
Preserve the full budget when only one child subtree is selected, and cover 
this projected-schema case in the concurrency tests.



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