zjw1111 opened a new pull request, #55940: URL: https://github.com/apache/arrow/pull/55940
### Rationale for this change When Parquet decodes BYTE_ARRAY values into ordinary Arrow string or binary arrays, Clang and GCC Release builds can emit a call to `AppendValue` for every non-null value. This shows up in both dictionary and PLAIN decoding, even when the entire batch fits in the current output chunk. ### What changes are included in this PR? Move finishing the current chunk and reserving space in the next one into a single `ARROW_NOINLINE` helper. Both compilers then inline the common append path into the decode loop and call the helper only when the next value would exceed the 32-bit offset limit. ### Are these changes tested? Local boundary checks exercised both dictionary and PLAIN decoding with a value that exactly filled the current chunk, an empty string and a null at the limit, and a subsequent value that started a new chunk. The baseline and patched readers also produced matching SHA-256 digests over the decoded full-table output. ### Are there any user-facing changes? Single-threaded Parquet reads were faster on a string-heavy table. The timings below are median wall times for three full scans of the same four warm-cache files on Linux x86-64 (132,752,584 rows, 10,000 rows per batch). The baseline was `fbf6c9f846`. The GCC baseline measurement affected by CPU contention was repeated with the same CPU affinity. | Release compiler | Before | After | Reduction in scan time | | --- | ---: | ---: | ---: | | Clang 17.0.6 | 33.27 s | 29.56 s | 11.2% | | GCC 11.4.0 | 40.36 s | 29.24 s | 27.6% | ### Was AI used for this PR? **PR code and description written by:** - [ ] Human - [x] AI **Reviewed before submission by:** - [x] Human - [x] AI - [ ] Not reviewed Closes #55939. Drafted with assistance from OpenAI Codex. -- 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]
