hcrosse opened a new pull request, #1592: URL: https://github.com/apache/arrow-go/pull/1592
### Rationale for this change A page encoding unsupported for the column's physical type reaches typed decoder traits that panic. `pqarrow`'s `SeekToRow`, parallel record reader and struct readers with `Parallel` read on goroutines without recovery, so the process exits. I reproduced this on v18.9.0 and main, with Go 1.26.10 on macOS arm64. A `DOUBLE` page marked `DELTA_BINARY_PACKED` produces: ```text panic: unimplemented encoding for float types: DELTA_BINARY_PACKED ``` ### What changes are included in this PR? Before building a decoder, `initDataDecoder` calls `checkEncodingType`, which uses the type sets of C++'s `MakeDecoder`: https://github.com/apache/arrow/blob/976779b2aac587f51b87c3bd2e6ae4c36f75ab6c/cpp/src/parquet/decoder.cc#L2712-L2797 It replaces the `RLE` and `ALP` checks and rewords their messages, so `TestALPOnIntegerColumnIsRejected` expects the new one. The spec allows `DELTA_BYTE_ARRAY` on `FIXED_LEN_BYTE_ARRAY`, so the check accepts it. ### Are these changes tested? The `Unsupported encoding` subtests of `TestDictionaryEncodedPages` cover the 22 unsupported pairs and `RLE` on `INT32`, with V1 and V2 pages. The 22 pairs panic on main, and `TestParallelRecordReaderUnsupportedEncodingReturnsError` ends the test process. Full `go test -race -tags assert,test ./parquet/...` and `golangci-lint` 2.13.2 passed on linux/amd64 with pinned test data, and focused tests passed on macOS arm64. ### Are there any user-facing changes? Yes. Unsupported encodings return errors instead of panicking. There is no API change. -- 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]
