Skip to content

ZonedStrategyBuilder: per-field zone maps, zones cut inside the writer - #10928

Draft
mhk197 wants to merge 1 commit into
developfrom
mk/zoned-strategy-builder
Draft

mhk197 wants to merge 1 commit into
developfrom
mk/zoned-strategy-builder

Conversation

@mhk197

@mhk197 mhk197 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds ZonedStrategyBuilder, which picks each column's zone map (zone length and aggregates) by field path, and makes ZonedStrategy cut zones itself instead of relying on the 8k RepartitionStrategy above it. This is the first step towards multi-resolution zone maps (#7939): one zone map per column, in the existing vortex.zoned format.

Changes

  • ZonedStrategyBuilder: with_zones, with_field_zones(path, zones) (the longest matching path wins; an empty list writes no zone map), with_concurrency, build(child, stats).
  • ZoneOptions { zone_len, aggregate_fns } describes one zone map. Zone lists already take several entries, but build rejects more than one per column until vortex.zoned.v2 exists.
  • LayoutWriterContext carries the field path, and StructStrategy appends each field's name.
  • ZonedStrategy cuts each chunk at zone boundaries, aggregates each piece on its own task, and combines the partials of zones that span chunks.
  • WriteStrategyBuilder::with_zoned. By default the zone length is still the row block size, and the 8k repartition stays.
  • Breaking: ZonedLayoutOptions and ZonedStrategy::new are replaced by the builder.

Testing

  • New tests: zones that don't line up with input chunks (smaller, larger, unaligned), per-field overrides (nested, empty), more than one zone map rejected.
  • Default output is byte-identical to develop: vx convert of TPC-H SF1 customer, orders, lineitem and ClickBench hits_0 gives the same SHA-256 on both builds.
  • cargo nextest run -p vortex-layout -p vortex-file (886 passed), cargo clippy ... -D warnings, cargo +nightly-2026-09-10 fmt.

Follow-up

@mhk197 mhk197 added the changelog/break A breaking API change label Oct 28, 2026
@codspeed

codspeed Bot commented Oct 28, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 31.04%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 4 improved benchmarks
✅ 2200 untouched benchmarks
⏩ 370 skipped benchmarks1
🗄️ 30 archived benchmarks run2

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Walltime threshold_neon[64] 4.1 µs 2.5 µs +62.8%
⚡ Walltime threshold_neon[80] 4.7 µs 3.4 µs +38.77%
⚡ Walltime filter_neon[80] 2.8 µs 2.4 µs +16.68%
⚡ Walltime filter_neon[64] 2 µs 1.7 µs +11.86%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing mk/zoned-strategy-builder (fb3b160) with develop (9a844c1)

Open in CodSpeed

Footnotes

  1. 370 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. 30 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. ↩

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days

@github-actions github-actions Bot added the stale This PR is stale and will be auto-closed soon label Nov 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change stale This PR is stale and will be auto-closed soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant