Stage B part 2: self-joins — the batch as build side (TASK-59) - #46
Merged
Conversation
ahrzb
approved these changes
Jul 28, 2026
… 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
Bot
force-pushed
the
task-59-selfjoin
branch
from
July 28, 2026 03:13
3c6db83 to
675b707
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
ONself-joins serve undershape='many'(multiset parity, engine-defined order); LEFT null-extension included.USING/NATURALself-joins: named follow-up rejection. Default shapes keep the original error.rowidnow routes to the documented rowid descope instead of a bind error (the corpus's 3 rowid self-joins classify cleanly).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