Skip to content

U4 (D-RU-4): co-addressed join operator over one JoinDomain - #1658

Merged
AdaWorldAPI merged 7 commits into
mainfrom
ccr-d3ce1263-ied9yh
Oct 21, 2026
Merged

AdaWorldAPI merged 7 commits into
mainfrom
ccr-d3ce1263-ied9yh

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

What

crepe-plan-probe::coaddressed adds the co-addressed join as a named operator: a conjunction of per-table Rels over one JoinDomain (plan d-relalg-unified-v1.md §5.3, §6, stage U4).

How a query runs:

  • Per side: rel_i runs as a relalg fold over that side's own rows. A mask-risc GroupReduce Count then counts the selected rows per slot. It is keyed by the side's slot lane, which is built from the side's own offsets and is non-decreasing.
  • Unrestricted sides: a side with Rel::All uses its prepared presence plane and reads no rows.
  • Joint: a relalg And of the slot planes.
  • Answers:
    • distinct centers, the popcount of the joint;
    • the bag count, a dot product of the per-side counts;
    • matching(pattern), a fold over the joint that builds no row.

CoTable's fields are private. CoTable::prepare is the only constructor, so every side is laid out over the table's own domain (Codex P2).

The star path applies a restriction to the rows before layout. Here the restriction is a query-time Rel over one table laid out without it, and it can be anything relalg lowers on a U32 lane, including !=, Or and Not.

mork_pathmap_probe::join::Side gains two read-only accessors, values() and offsets().

Speed: failed gate

Every arm of examples/coaddressed.rs ran in milliseconds, including the star path's per-query layout. Under the CLAUDE.md P0 no-ms rule (2026-10-21) that is a failed gate, not a measurement, so no timing is reported here. The timings in the first version of this body are withdrawn.

Where the operator leaves the mask-risc terminals (read from the code, not attributed by measurement):

  • a full row mask is kept per filtered side;
  • the GroupReduce sink is an i64 buffer of domain size;
  • a scalar loop builds the slot plane;
  • per-slot products are computed in scalar code;
  • two programs run per filtered side.

D-RU-4 is not shipped until that path runs in nanoseconds.

Correctness

The tests compare answers by folds, not by building rows:

  • parity_with_the_star_path: bag count, distinct centers and pinned per-derivation counts, against native::matching / distinct_centers;
  • disjunctive_restrictions_match_the_reference: Or, Not and !=, against a counting nested-loop oracle;
  • no_gather: every program run passes !has_foreign_hop;
  • all_sides_read_as_prepared and refusals;
  • examples/coaddressed.rs: every arm agrees (now part of crepe-plan-probe CI).

Five disables, each turning its target test red. The gather disable is an answer-correct ScatterOrU32 projection, and it fails only no_gather.

Board

  • entries/2026-10-21-u4-coaddressed-join.md (FAILED GATE on speed, correctness measured)
  • D-RU-4 row in STATUS_BOARD and the plan note
  • indexes regenerated

Open

  • Fold each side's Rel into the projection terminal, sink into a plane, and answer counts through a terminal over the kept joint.
  • A restriction on the center itself.
  • Factorization through two domains.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Per-side Rels at query time over one table laid out without them.
64 restricted star queries at 200k rows: 1423 ms laying out per query,
776 ms with semijoin, 12.4 ms + 30.4 ms one layout here. Answers equal
the star path and a nested-loop reference; no program has a foreign hop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 614811a6-0816-4fa9-94e6-f5156ccc9eb2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 21, 2026 08:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T08:55:04.259963Z 9ad0ed3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ad0ed3477

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/crepe-plan-probe/src/coaddressed.rs
…an be installed

Codex P2 on #1658: with public fields a caller could put in a side laid out
over another JoinDomain. Keys and generations would still match, and equal
slots would then name different centers. prepare is now the only constructor;
the fields are read through accessors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
main (#1657) removed native::bindings, the tuple builder. CoEval::bindings
built the same shape (a clone per combination, sort, merge into
Vec<(Vec<u64>, u64)>), so it is replaced by CoEval::matching(pattern), a
fold over the joint that inverts a pinned center to its slot. The parity
test compares bag totals and, per derivation the star path reads, the
pinned multiplicity against native::matching; the disjunctive test
compares totals and per-center / per-(x, c) counts against a counting
nested-loop oracle. The entries index is regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
…hdrawn

Every arm of examples/coaddressed.rs ran in milliseconds, the star path's
included. Under CLAUDE.md P0 (2026-10-21) that is a failed gate, so the
entry, the STATUS_BOARD row and the plan note no longer report timings. They
name where the operator leaves the mask-risc terminals: a kept row mask per
filtered side, an i64 sink of domain size, a scalar loop building the plane,
and scalar per-slot products. Correctness (parity, no foreign hop, the
disables) stands. bindings -> matching after 1d1c0b7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
@AdaWorldAPI
AdaWorldAPI merged commit 1bbb541 into main Oct 21, 2026
15 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Oct 21, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
AdaWorldAPI added a commit that referenced this pull request Oct 21, 2026
AdaWorldAPI pushed a commit that referenced this pull request Oct 21, 2026
…main

#1658's co-addressed join used Side::values(), a slot-order copy of the
non-key column. #1659 removed that copy. The restriction now runs over the
relation's lane in row order, and each side row reads its bit through
Side::positions(); values_at reads lane()[positions()[j]]. Store is lane
based (Store::from_rows) in the module, its tests and its example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
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.

2 participants