Skip to content

DDIR: batch halfjoin key checks after time filtering - #945

Closed
frankmcsherry wants to merge 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-halfjoin-batched-keys
Closed

frankmcsherry wants to merge 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-halfjoin-batched-keys

Conversation

@frankmcsherry

@frankmcsherry frankmcsherry commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Filter halfjoin candidates by timestamp eligibility, then check real keys in bounded batches grouped by source-column pair through Corgi's existing equal_idx kernel. Primitive keys remain direct. Candidate order, projection, timestamps and signed diffs are preserved.

Retains the per-run traversal from merged #937: meet each run in identifier order and advance arranged-chunk seeks once after all runs in the block. Comparisons borrow their source columns. The candidate buffer flushes at the existing block size, including within a large colliding identifier range.

One commit directly on master-next, changing only interactive/src/corgi/half_join/tactic.rs. Regressions cover forced collisions, strict/non-strict time eligibility, and 257 interleaved comparisons with mixed narrow/wide storage. Run-endpoint certification remains the separate draft #948.

Validation on mini-02, Rust 1.95: cargo test --locked --offline -p interactive -p ddir-server passes 192 tests with five existing ignores; cargo clippy --locked --offline -p interactive -p ddir-server --all-targets passes with repository warnings. The halfjoin integration test compares delta joins and recursive reachability with binary joins over 24 update/retraction ticks, with one and three workers.

Benchmarks were not rerun for this rebase. Earlier triangle timings were approximately neutral and predate the per-run traversal.

Use bounded indexed equality grouped by source-column pair over borrowed keys. Preserve candidate order, strict time eligibility and signed differences; cover collisions and mixed integer storage.
@frankmcsherry
frankmcsherry force-pushed the ddir-halfjoin-batched-keys branch from cbfea97 to 94517dc Compare October 19, 2026 01:36
@frankmcsherry
frankmcsherry changed the base branch from ddir-half-join to master-next October 19, 2026 01:36
frankmcsherry added a commit that referenced this pull request Oct 19, 2026
…ering (#954)

* corgi half join: check hashed keys per run and chunk, after time filtering

A pair whose identifiers match must also precede in time and, when keys are hashed, have equal
real keys. Test time first, and compare the surviving pairs' real keys with one equal_idx call
per run and arranged chunk (in batches of at most BLOCK), instead of a compare_at per candidate.
The per-run meet already produces each run's and chunk's pairs together, so no regrouping is needed.

Replaces the approach in #945; its collision test is kept.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o

* corgi half join: skip the key check when no pairs await it

A run and chunk with no time-eligible pairs, or none since the last full batch, no longer enter
corgi with an empty comparison.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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