Skip to content

feat(fuzz): row-encoding fuzz target for vortex-row#8955

Merged
HarukiMoriarty merged 3 commits into
developfrom
nemo/row-fuzz
Jul 24, 2026
Merged

feat(fuzz): row-encoding fuzz target for vortex-row#8955
HarukiMoriarty merged 3 commits into
developfrom
nemo/row-fuzz

Conversation

@HarukiMoriarty

@HarukiMoriarty HarukiMoriarty commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #8937, where @a10y suggested a fuzz target for vortex-row.

What it does

Adds a row_encode fuzz target that generates 1–3 same-length columns of arbitrary dtypes (via the existing ArbitraryArray machinery) with independent per-column RowSortField configs (descending × nulls-first), and checks three properties:

  1. Sizes: compute_row_sizes' per-row {fixed, var} totals equal the encoded key lengths.
  2. Order: byte comparison of any two keys equals a logical tuple comparison of the row values, asserted pairwise. The oracle is independent of the encoder: it lifts each row into a RowKey (recursive over structs/FSLs) and compares with the byte format's exact semantics, nulls positioned by nulls_first regardless of direction, and descending inverting leaf values only.
  3. Cross-chunk: keys from separate encode calls over different slices of the same columns, still compare correctly against each other. This is the contract sort/top-k operators rely on when comparing keys across batches.

Unsupported dtypes (List, Variant, Union, Extension, Decimal256) assert that the encoder rejects them. The target is wired into the scheduled fuzz workflow like the existing targets.

Generates 1-3 same-length columns of arbitrary dtypes with per-column
RowSortField configs and checks three properties:

- computed row sizes match the encoded key lengths
- byte comparison of whole-array keys equals a logical tuple
  comparison under an independent total-order oracle (IEEE-754 total
  order for floats, positional nulls, leaf-only descending inversion)
- keys stay comparable across separately encoded chunks, including
  chunks recompressed by btrblocks to different physical layouts

The cross-chunk property reproduces the decimal key-width bug fixed
in #8937 within minutes when run against develop without that fix.

Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
@HarukiMoriarty
HarukiMoriarty marked this pull request as ready for review July 24, 2026 17:59
@HarukiMoriarty
HarukiMoriarty requested a review from a10y July 24, 2026 18:02
@a10y a10y added the changelog/skip Do not list PR in the changelog label Jul 24, 2026
@HarukiMoriarty
HarukiMoriarty merged commit 2f8c569 into develop Jul 24, 2026
86 of 87 checks passed
@HarukiMoriarty
HarukiMoriarty deleted the nemo/row-fuzz branch July 24, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/skip Do not list PR in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants