Repository navigation
fix(compressor): detach constant byte scalars from source buffers - #86
Merged
ChristopherWirt merged 2 commits intoNov 4, 2026
Merged
Conversation
Signed-off-by: Christopher Wirt <cwirt@quantcast.com>
Copy string and binary bytes nested in tuple values too, so constant struct- or list-backed extension columns also release the source chunk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christopher Wirt <cwirt@quantcast.com>
gitRasheed
approved these changes
Nov 4, 2026
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.
Summary
Writing a constant string or binary column can keep each uncompressed input chunk alive until the file is closed.
ConstantArrayfromexecute_scalar, which returns a zero-copy slice of the source's views or data buffer.The fix copies UTF-8 and binary scalar bytes into their own allocation before building the constant. This includes bytes nested in struct or list values, such as a constant extension column backed by a struct. Numeric and all-null constants are unchanged.
Related upstream issue: vortex-data#10599
Testing
constant_bytes_release_source_buffer(rstest) covers UTF-8 and binary values, both inlined (8 B) and out-of-line (128 B), each nullable and non-nullable.constant_nested_bytes_release_source_buffercovers an extension type backed by a struct of strings.constant retained the source buffer.cargo nextest run -p vortex-compressor: 393 passed.cargo clippy -p vortex-compressor --all-targets --all-features -- -D warningsandcargo +nightly-2026-09-10 fmt -p vortex-compressor: clean.Spark writer benchmark
Setup:
🤖 Generated with Claude Code