Skip to content

Add Utf8 types for RowFn - #9715

Open
connortsui20 wants to merge 1 commit into
developfrom
ct/row-fn-string
Open

Add Utf8 types for RowFn #9715
connortsui20 wants to merge 1 commit into
developfrom
ct/row-fn-string

Conversation

@connortsui20

@connortsui20 connortsui20 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

Adds Utf8 column and view types for the RowFn framework.

(This is getting upstreamed from https://github.com/spiraldb/spiraldb/pull/6858)

Changes

Adds Utf8Column and Utf8View as InputElement and decode targets for use in Vortex.

We should figure ou tif we want to ship a string library with Vortex (since there is not equivalent string library in Arrow)

Add `Utf8Column` and `Utf8Sink` to the unstable row function types.

`Utf8Column` decodes a `Utf8` column once per batch and hands each row
callback a `Utf8View`. The view dereferences to `str`, so a callback
calls `str` methods on it directly. It also exposes the string-view
length, prefix and inline flag, which a comparison kernel can read before
it reads the bytes. The column also accepts a batch constant.

`Utf8Sink` builds a `VarBinViewArray` output. It initializes every row to
an empty string, so its skipped-row initializer does no work and
skip-invalid execution needs no input filter.

The decode step validates every view and replaces the view of each null
row with an empty view. A dense callback can therefore read the payload
of a null row, and `Utf8View::as_str` can skip the UTF-8 check.

These types come from the SpiralDB engine, where the `spql.str.*`
functions use them.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@codspeed-hq

codspeed-hq Bot commented Sep 1, 2026

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 16 improved benchmarks
❌ 2 regressed benchmarks
✅ 2072 untouched benchmarks
⏩ 206 skipped benchmarks1
🗄️ 4 archived benchmarks run2

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime arrow_checked_add_u32_neon[16384] 12.4 µs 20.4 µs -39.24%
Simulation compact[(2048, 90)] 1.4 µs 1.5 µs -10.63%
WallTime add_shapes_neon[(128, PerRowPerRow)] 3.7 µs 1.9 µs +90.91%
WallTime multiply_shapes_neon[(128, PerRowPerRow)] 2.9 µs 2 µs +47.49%
WallTime subtract_shapes_neon[(128, PerRowPerRow)] 2.9 µs 2 µs +47.01%
WallTime mul_u64_nonnull_neon 21.2 µs 15.2 µs +39.44%
WallTime mul_i64_nonnull_neon 20.9 µs 17.2 µs +21.79%
WallTime multiply_shapes_neon[(16384, PerRowPerRow)] 20.7 µs 17 µs +21.53%
WallTime arrow_checked_add_u32_avx512[16384] 21.3 µs 17.6 µs +20.5%
WallTime arrow_checked_add_u32_avx2[16384] 21.3 µs 17.7 µs +20.25%
WallTime add_u32_nonnull_neon 7.9 µs 6.6 µs +20.22%
WallTime add_shapes_neon[(16384, PerRowPerRow)] 11.3 µs 9.8 µs +16.29%
WallTime add_i32_nonnull_neon 9 µs 7.8 µs +15.29%
WallTime add_i64_nonnull_neon 11.3 µs 9.8 µs +15.28%
WallTime compare_int_nullable_neon 5.6 µs 4.9 µs +14.29%
WallTime words_gather_scalar_avx2[65536] 9.4 µs 8.2 µs +13.61%
Simulation cold_misaligned[(16, 64)] 392.4 µs 346.1 µs +13.38%
WallTime add_i64_nullable_neon 12.8 µs 11.5 µs +11.42%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ct/row-fn-string (0c141b1) with develop (a67cd1b)

Open in CodSpeed

Footnotes

  1. 206 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. 4 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them.

@connortsui20 connortsui20 added the changelog/feature A new feature label Sep 1, 2026
@connortsui20 connortsui20 changed the title feat(row): add a UTF-8 input column and output sink for row functions Add Utf8 types for RowFn Sep 1, 2026
@connortsui20
connortsui20 marked this pull request as ready for review September 1, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant