Skip to content

Stage B part 2: self-joins — the batch as build side (TASK-59) - #46

Merged
claude-agent-ahrzb[bot] merged 2 commits into
masterfrom
task-59-selfjoin
Jul 28, 2026
Merged

Stage B part 2: self-joins — the batch as build side (TASK-59)#46
claude-agent-ahrzb[bot] merged 2 commits into
masterfrom
task-59-selfjoin

Conversation

@claude-agent-ahrzb

Copy link
Copy Markdown

Stacked on #45. The second occurrence of the dynamic table binds as a keyless batchmap join: the executor flattens the batch once per call, and the whole ON rides as a per-pair residual — cross-then-filter, which the pins proved bit-identical under multiplicity.

  • Comma/cross and ON self-joins serve under shape='many' (multiset parity, engine-defined order); LEFT null-extension included.
  • USING/NATURAL self-joins: named follow-up rejection. Default shapes keep the original error.
  • Qualified rowid now routes to the documented rowid descope instead of a bind error (the corpus's 3 rowid self-joins classify cleanly).
  • Star EXCLUDE over self-joins works through the existing scope machinery (unqualified strips both copies, qualified one side — the corpus shapes are tested).

Corpus: 550 / 128 / 0 FAIL of 678 (546 after part 1, 529 before the wave — the stage-B pool is fully resolved: 21 served + 3 USING named + 3 rowid descoped). cargo 168, pytest 616 + 13 xfail.

🤖 Generated with Claude Code

@claude-agent-ahrzb
claude-agent-ahrzb Bot changed the base branch from task-59-stage-b to master July 28, 2026 03:12
ahrzb and others added 2 commits July 28, 2026 05:13
… shape='many' (TASK-59 stage B-4)

The second occurrence of the dynamic table binds as a keyless BATCHMAP
join: the executor flattens the batch once per call into multimap-value
rows (validity+payload for nullables) and the whole ON rides as a
per-pair residual — cross-then-filter, which the pins proved
bit-identical under multiplicity. Comma/cross and ON self-joins serve
(multiset parity, the engine's documented order); USING/NATURAL
self-joins are a named follow-up rejection; the default shapes keep the
original error. Qualified rowid on any table now routes to the
documented rowid descope instead of a bind error.

StaticTy::BatchMap + PreparedStatic::BatchMap + per-call
build_batch_rows in the interpreter; cranelift pre-rejects; ScopeJoin
carries Cow<StaticTable> so the synthetic batch table needs no
lifetime gymnastics.

Corpus: 550 match / 128 clean-unsupported / 0 FAIL of 678 (was 546).
cargo 168, pytest 616 + 13 xfail.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude-agent-ahrzb
claude-agent-ahrzb Bot merged commit d027dcd into master Jul 28, 2026
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