Repository navigation
perf(arrow-row): skip the per-element probe when decoding FixedSizeList of fixed-width values - #1
Closed
Mukunth1004 wants to merge 2 commits into
Closed
Mukunth1004 wants to merge 2 commits into
Mukunth1004 wants to merge 2 commits into
Conversation
…st of fixed-width values decode_fixed_size_list worked out where each element ends by decoding it into a one-row array. Primitive, boolean, null and fixed size binary values all encode to the same length as the null element we already build, so for those types just cut the row into chunks of that width. Closes apache#12537
Mukunth1004
force-pushed
the
fix/12537-fixed-size-list-row-decode
branch
from
December 3, 2026 07:12
080c704 to
5920f05
Compare
Owner
Author
|
Opened upstream as apache#12540. |
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.
Which issue does this PR close?
#12537Rationale for this change
decode_fixed_size_listfinds where each element of a valid row ends bydecoding it into a throwaway one-row array (
convert_rawper element). For aFixedSizeList(Float32, 768)that is 768 array builds per row. For elementtypes whose row encoding has a fixed width, every element (null or not) is as
long as the encoded null element the function already computes, so the probe
is not needed.
What changes are included in this PR?
Two commits:
chore(arrow): addsrow_formatbenchmarks forFixedSizeList(f32 x 8 andf32 x 768, plus utf8 x 8 as a variable-width control). Use this commit as
baseline.ref.perf(arrow-row): when the element type is primitive,Boolean,NullorFixedSizeBinary, cut each valid row intovalue_lengthchunks of thenull element's encoded width with
chunks_exact, and sizechild_rowsup front. Other element types keep the existing loop.
No public API change.
The variable-width path (the issue's second suggestion) is left for a separate PR.
Are these changes tested?
Existing
FixedSizeListtests exercise the new path (Int32, Null, two adjacentlists). Added
test_fixed_size_list_of_fixed_width_values, which round-tripsBoolean, Float32 (incl. NaN and -0.0), Decimal128, FixedSizeBinary and Null
elements with list-level and element-level nulls, under all four sort option
combinations, followed by a second column to check the row is advanced
correctly.
Benchmarks (
cargo bench -p arrow --features test_utils --bench row_format -- "convert_rows .*fixed_size_list",local Linux machine, shared, so expect some noise):
No input gets slower: variable-width elements take the unchanged path.
Are there any significant user-facing changes?
No.
AI usage disclosure
Claude Code assisted with investigating the issue and developing the implementation and tests. I reviewed the changes, verified the test results and benchmarks, and understand the implementation. I'll take responsibility for addressing review feedback and maintaining this contribution.