Skip to content

DDIR: validate join keys in batches - #944

Merged
frankmcsherry merged 6 commits into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-join-batched-keys
Oct 18, 2026
Merged

frankmcsherry merged 6 commits into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-join-batched-keys

Conversation

@frankmcsherry

@frankmcsherry frankmcsherry commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Validate structured join keys by collecting matched identifier-run endpoints for a whole block, grouping their indices by source-column pair, and calling equal_idx once per group. Omit self comparisons, duplicate singleton endpoints and the hash lane. Delete the per-key one_key check. Collision output-pair filtering uses the same indexed interface while retaining output order.

Exact primitive identifiers keep the streaming path. Structured value merging and rare collision staging retain their existing comparison fallback. The comparison path reads borrowed columns without gathering payloads.

Builds on #941 and shares an identical iterator-based chunk.rs key-run validator with #943. Pins merged WIP master 2c9a8ce from Corgi #105. No dependency on the reduction PR or the scalar-comparator proposal.

Validation: 181 interactive/server tests pass with five existing ignores; the combined #943-#947 stack passes 191 with five existing ignores. Workspace Clippy passes with existing repository warnings. Regressions exercise forced collisions, disagreement across sides/chunks, symmetric joins and both lopsided directions; existing tests cover cancellation, product times and multiple blocks.

The earlier isolated presentation control improved pair-key symmetric joins from 450.8 to 94.3 ns/key and list-key joins from 297.3 to 104.9; those numbers precede this interface simplification and were not rerun. Fresh IC6/BI5 controls for #943 verify that replacing the pooled API with indexed calls preserves that consumer's query gains. No new whole-query join speedup is claimed. Benchmark artifacts remain outside the code diff.

Keep up to four borrowed run descriptions inline, and reuse each side's
cross-chunk merge heads across keys. This removes two run-description
allocations per matching key and repeated compound-value merge scratch
allocation without changing presentation or consolidation.

Keep the regression for seven chunks, cancellation and successive keys,
which exercises both inline-capacity spilling and scratch reuse.
Check all matched identifier-run endpoints in a block through Corgi's
borrowed equality API, omitting self and duplicate endpoint checks. Batch
collision-pair filtering too, and delete the per-key one_key helper.
Keep primitive identifiers streaming, without unnecessary block metadata.

Retain structural value merging and collision staging as fallbacks. Add
cross-side/chunk collision coverage for symmetric and both lopsided joins.
Build on the scratch reuse in TimelyDataflow#941; pin the API from WIP TimelyDataflow#105.
Move join's iterator-based endpoint check into corgi/chunk.rs. The reduce
PR carries the identical helper so each PR builds independently and their
merged source retains one implementation.

Pin the stable-order borrowed equality implementation from WIP TimelyDataflow#105.
@frankmcsherry
frankmcsherry merged commit c16624d into TimelyDataflow:master-next Oct 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant