Repository navigation
GH-55939: [C++][Parquet] Keep chunk rollover out of the BYTE_ARRAY append loop - #55940
Merged
Merged
Conversation
HuaHuaY
approved these changes
Dec 3, 2026
Open
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
AppendValuefor 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_NOINLINEhelper. 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.The original upgrade benchmark compared Arrow 17.0.0 and 26.0.1 on the same four Parquet files. Paimon C++ benchmark results
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by:
Drafted with assistance from OpenAI Codex.