Repository navigation
feat: use aligned slice access during bulk append in SparkUnsafeArray #4672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
58189a1
Builder appending refactoring
sandugood 7778a84
Formatting, small refactoring and adding docstrings
sandugood 2bee010
Added docstring regarding alignment
sandugood 6abf1f7
Fixed the fallback in an unaligned but NULLABLE case, that was failin…
sandugood 7439706
Merge remote-tracking branch 'upstream/main' into feat/enable-slice-a…
sandugood 74265c7
Changes fixed
sandugood d2c85e4
Merge remote-tracking branch 'upstream/main' into feat/enable-slice-a…
sandugood 662a7f2
Fixed cargo formatting
sandugood 7bf6f15
Merge remote-tracking branch 'upstream/main' into feat/enable-slice-a…
sandugood 157c73f
Remade the building process using arrow buffers with no hot-spots in …
sandugood 0e5fcad
Formatting fix
sandugood 42bd9dd
Added docstring about runtime check of alignment
sandugood df678f9
Merge remote-tracking branch 'upstream/main' into feat/enable-slice-a…
sandugood 9cbe7aa
Addressed the review comments
sandugood 9e297b5
Fixed formatting
sandugood b2eb684
Added docstring regarding endianess
sandugood ab4d1f6
Merge remote-tracking branch 'upstream/main' into feat/enable-slice-a…
sandugood ba24cd5
Merge remote-tracking branch 'upstream/main' into feat/enable-slice-a…
sandugood 9b45105
Merge branch 'main' into feat/enable-slice-access
mbutrovich c3f5898
Merge remote-tracking branch 'apache/main' into feat/enable-slice-access
andygrove baa5859
test: cover a timestamp array with a timezone in the append round trip
andygrove File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Could we retain an allocation-free path for short arrays? Every aligned nullable append now allocates temporary bitmap/value buffers, and
append_arraycopies the values again into the builder.append_list_column_batchinvokes this with<true>for every list, including lists without null elements. Using the exact base/head methods with Arrow 58.3.0, a release benchmark includingListBuilderconstruction, downcasting, and list appends measured singletonarray<int>conversion at 19.34 ns/row before versus 212.48 ns/row after, about 11× slower. An allocation counter independently measured 0 versus 4,000 allocations for 1,000 singleton appends into a preallocated builder. This materially increases conversion CPU for JVM shuffle workloads containing many short arrays. Preserve the scalar loop below a measured size cutoff, or reuse storage to avoid these per-list allocations. The same approach applies to the date and timestamp helpers.Evidence: Disposable harness:
/tmp/comet-4672-append-check. The extracted append-method bodies were verified against both supplied SHAs. Runcargo run --release --offline --manifest-path /tmp/comet-4672-append-check/Cargo.toml --bin list_benchand the same command with--bin allocations. The list benchmark uses 8,192 rows per batch, 64 distinct aligned input arrays, initial values-builder capacity 32, and medians of nine alternating base/head measurements. Singleton arrays without nulls measured 19.34→212.48 ns/row, and singleton null arrays measured 20.86→199.24 ns/row. Shorter-path allocation overhead is confirmed by the deterministic 0→4 allocations per singleton append. A separate 10,000-element benchmark confirmed the intended large-array improvement, so the finding concerns the unconditional use of this path for short arrays.