vortex-row: convert_columns + tests + bench scaffolding#7993
Closed
joseph-isaacs wants to merge 1 commit into
Closed
vortex-row: convert_columns + tests + bench scaffolding#7993joseph-isaacs wants to merge 1 commit into
joseph-isaacs wants to merge 1 commit into
Conversation
Wire the RowSize/RowEncode scalar functions to the user-facing API:
- `convert_columns` accepts a slice of input arrays and per-column
SortFields, constructs `RowEncodeOptions` + `VecExecutionArgs`, and
returns the encoded `ListViewArray<u8>`.
- `compute_row_sizes` returns just the per-row sizes (the `Struct
{ fixed: u32, var: u32 }` output of `RowSize`).
- `initialize()` now registers `RowSize` and `RowEncode` on the given
session so they are reachable via the expression layer.
Tests cover sort-order round-trips for bool, primitive (i64 asc/desc,
u32, f64), utf8, multi-column, nulls_first/last, struct sort-order, the
single-buffer invariant of the ListView output, and the structural
shape of `RowSize`. Tests that exercise per-encoding fast paths
(`constant_path_matches_canonical`, `dict_path_matches_canonical`) land
together with their respective kernels in PR 3.
The bench file uses divan + mimalloc and reports throughput in GB/s of
encoded output bytes for primitive_i64, utf8, and struct_mixed. Each
has an `arrow_row` baseline and a `vortex` measurement. Per-encoding
fast-path scenarios (constant/dict/patched/bitpacked/for/delta) gain
their triplets in PR 3.
Baseline measurements at this commit (sample-count=10):
primitive_i64_vortex ~1.97 GB/s (vs arrow-row 4.12 GB/s)
utf8_vortex ~0.87 GB/s (vs arrow-row 1.56 GB/s)
struct_mixed_vortex ~0.95 GB/s (vs arrow-row 1.19 GB/s)
PR 2 closes most of the gap by replacing the validating
`ListViewArray::try_new` with `new_unchecked`, skipping the buffer
zero-init, auto-vectorizing the offsets and varlen-block paths, etc.
Signed-off-by: Claude <noreply@anthropic.com>
This was referenced May 18, 2026
This was referenced May 18, 2026
Closed
Merging this PR will not alter performance
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
161.9 µs | 197.6 µs | -18.08% |
| ⚡ | Simulation | chunked_varbinview_opt_canonical_into[(1000, 10)] |
224.9 µs | 187.6 µs | +19.85% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/row-c08-convert-columns-tests-bench (87febfe) with claude/row-c07-rowencode-scalarfn (40783a6)
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.
Part 8 of 25 in the stacked PR series adding
vortex-row.This PR contains exactly one commit; review just that diff in isolation.
What this commit does
Wires the RowSize/RowEncode scalar functions to the user-facing API:
convert_columnsaccepts a slice of input arrays and per-column SortFields, constructsRowEncodeOptions+VecExecutionArgs, and returns the encodedListViewArray<u8>.compute_row_sizesreturns just the per-row sizes (theStruct { fixed: u32, var: u32 }output ofRowSize).initialize()now registersRowSizeandRowEncodeon the given session so they are reachable via the expression layer.Tests cover sort-order round-trips for bool, primitive (i64 asc/desc, u32, f64), utf8, multi-column, nulls_first/last, struct sort-order, the single-buffer invariant of the ListView output, and the structural shape of
RowSize. The bench file uses divan + mimalloc and reports throughput in GB/s for primitive_i64, utf8, and struct_mixed, each with an arrow-row baseline. Per-encoding fast-path scenarios gain their triplets in PR 3.Baseline measurements at this commit (sample-count=10):
Stack
claude/row-c01-crate-scaffoldingclaude/row-c02-sortfield-optionsclaude/row-c03-codec-fixed-widthclaude/row-c04-codec-varlenclaude/row-c05-codec-nestedclaude/row-c06-rowsize-scalarfnclaude/row-c07-rowencode-scalarfnclaude/row-c08-convert-columns-tests-benchclaude/row-c09-skip-listview-validationclaude/row-c10-validity-fast-pathclaude/row-c11-skip-zero-initclaude/row-c12-vectorize-pure-fixed-offsetsclaude/row-c13-vectorize-mixed-offsetsclaude/row-c14-varlen-block-copy-nonoverlappingclaude/row-c15-walk-varbinview-directlyclaude/row-c16-arith-write-fast-pathclaude/row-c17-specialize-constant-arithclaude/row-c18-kernel-dispatch-helpersclaude/row-c19-inventory-registryclaude/row-c20-constant-kernelclaude/row-c21-dict-kernelclaude/row-c22-patched-kernelclaude/row-c23-runend-kernelclaude/row-c24-bitpacked-kernelclaude/row-pr3-kernelsBase of this PR: #7992 (
claude/row-c07-rowencode-scalarfn)Next in stack: #7994 (
claude/row-c09-skip-listview-validation)Combined context
For the full design + rationale, see PR #7985 (top of stack).