You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "fallintoplace (via GitHub)" <gi...@apache.org> on 2026/08/27 13:10:05 UTC

[PR] perf(parquet/pqarrow): use synchronous path for serial reads [arrow-go]

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

   ## Summary
   
   - `ArrowReadProperties.Parallel` is false by default.
   - `GetFieldReaders` now uses a direct loop for serial reads.
   - `ReadRowGroups` now reads columns directly for serial reads.
   - The parallel path is unchanged.
   - Added a benchmark for 1, 8, 32, and 128 columns with small row groups.
   
   ## Benchmark
   
   Apple M1 Pro. Median of 5 runs. The benchmark uses `Parallel=false`.
   
   | columns | upstream main | this PR | time change | allocs/op |
   | ---: | ---: | ---: | ---: | ---: |
   | 1 | 156.9 us | 128.8 us | -18% | 1124 -> 1106 |
   | 8 | 1.05 ms | 967 us | -8% | 7848 -> 7810 |
   | 32 | 3.38 ms | 3.24 ms | -4% | 31413 -> 31296 |
   | 128 | 11.92 ms | 11.18 ms | -6% | 124896 -> 124436 |
   
   Command:
   
   ```text
   go test ./parquet/pqarrow -run '^$' -bench '^BenchmarkReadTableSerial$' -benchmem -benchtime=1s -count=5
   ```
   
   ## Tests
   
   - `go test ./parquet/pqarrow -count=1`
   - `go test -race ./parquet/pqarrow -run '^(TestGetFieldReadersReleasesPartialReadersOnError|TestRecordReaderSerial|TestRecordReaderSeekToRow|TestRecordReaderParallel)$' -count=1`
   - `go vet ./parquet/pqarrow`
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] perf(parquet/pqarrow): use synchronous path for serial reads [arrow-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #1235:
URL: https://github.com/apache/arrow-go/pull/1235#discussion_r3882159162


##########
parquet/pqarrow/file_reader.go:
##########
@@ -370,6 +385,39 @@ func (fr *FileReader) ReadRowGroups(ctx context.Context, indices, rowGroups []in
 		return nil, err
 	}
 
+	if !fr.Props.Parallel {
+		columns := make([]arrow.Column, sc.NumFields())
+		defer releaseColumns(columns)
+		defer func() {
+			for _, rdr := range readers {
+				rdr.Release()
+			}
+		}()
+
+		for idx, rdr := range readers {
+			if err := ctx.Err(); err != nil {
+				return nil, err
+			}
+
+			data, err := fr.ReadColumn(rowGroups, rdr)

Review Comment:
   `ReadColumn` previously ran inside the worker’s deferred recovery boundary, which converted decoder panics into `panic while reading: …` errors. Calling it directly here lets those panics escape from `ReadTable`.
   
   I reproduced this through the public `FileReader` flow with a malformed extension implementation: the base returns the recovered error, while this head panics. Please preserve the recovery boundary for synchronous reads—ideally through a shared guarded helper—and add regression coverage.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] perf(parquet/pqarrow): use synchronous path for serial reads [arrow-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #1235:
URL: https://github.com/apache/arrow-go/pull/1235


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org