zeroshade commented on code in PR #13120:
URL: https://github.com/apache/arrow/pull/13120#discussion_r871664930


##########
go/parquet/pqarrow/file_reader.go:
##########
@@ -202,14 +211,35 @@ func (fr *FileReader) GetFieldReaders(ctx 
context.Context, colIndices, rowGroups
 
        out := make([]*ColumnReader, len(fieldIndices))
        outFields := make([]arrow.Field, len(fieldIndices))
-       for idx, fidx := range fieldIndices {
-               rdr, err := fr.GetFieldReader(ctx, fidx, includedLeaves, 
rowGroups)
-               if err != nil {
-                       return nil, nil, err
+
+       //* Read First error from errchan and break only capturing first error
+       go func() {
+               for err = range errchan {
+                       break
                }
+       }()
 
-               outFields[idx] = *rdr.Field()
-               out[idx] = rdr
+       // GetFieldReader causes read operations, when issued serially on large 
numbers of columns,
+       // this is super time consuming. Get field readers concurrently.
+       wg.Add(len(fieldIndices))

Review Comment:
   Same as before, we should respect any properties dictating limitations on 
the parallelizing instead of automatically doing it for *all* field indices.



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