You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 788fcd7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: ROADMAP.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@
20
20
18. EXPLAIN and global HAVING polish. Delivered in Phase 18: `EXPLAIN <select-statement>` parses as an additive wrapper and returns a deterministic one-column `plan` string batch from a shared optimizer-side renderer used by both engines; the report includes the bound logical plan, memo group/rule summary, `extract_best` chosen plan with per-node row/cost estimates, and total cost. HAVING without GROUP BY is now legal over the single global group with the same aggregate-output and 3VL rules as grouped HAVING, including HAVING-only aggregates that are computed and dropped by final Project. Differential/fuzz alternative extraction caps were raised so the current string-widened corpus no longer hits the plan bound.
21
21
19. Boolean-mask filter kernels. Delivered in Phase 19: vectorized Filter now evaluates WHERE/HAVING predicate trees as paired `is_true`/`is_known` byte masks using SQL Kleene 3VL algebra, with comparison leaves scanning pre-resolved int64 or string values column-at-a-time and `IS [NOT] NULL` leaves reading validity directly. Scan-adjacent identity selections use a dense full-batch domain, while filtered/non-identity inputs use dense selection-position masks that map back to the immutable input selection. Join residual predicates deliberately remain on the existing row-pair path. Release benchmark evidence in `docs/benchmarks.md` shows the three scan/filter vectorized medians improving with byte-identical correctness checks and no material non-target regression.
22
22
20. LEFT/RIGHT OUTER JOIN arc. Delivered across Phase 20a/20b: the parser accepts `LEFT [OUTER] JOIN` and `RIGHT [OUTER] JOIN`; binding normalizes RIGHT to LEFT while stable identities preserve SQL-visible projection order; both interpreted and vectorized engines implement deterministic left-row-major NULL-extension, NULL-key non-matching, and residual-aware matchedness for hash and non-equi joins. `LeftJoinToInnerRule` additively simplifies a filtered LEFT join only under a proof-bearing conservative 3VL null-rejection test, unlocking the existing INNER commute/associate/pushdown exploration without weakening their guards. The deterministic fuzzer now mixes INNER/LEFT/RIGHT chains with actual NULL-bearing key data and verifies standalone rewrites, every memo alternative, and `extract_best` through both engines. The Phase 20a LEFT cardinality rule remains sufficient; no 20b cost-model change was required. The outer-join lowering guard and its verifier path are gone.
23
-
21. Complete uncorrelated-subquery arc. Delivered across Phase 21a/21b: scalar-comparison, IN/NOT IN, and EXISTS/NOT EXISTS use fresh-scope immutable bound subplans and the pinned eager once-per-query 3VL/cardinality oracle. Explicit left SEMI/ANTI algebra has left-only output identity, deterministic interpreted and vectorized hash/NLJ execution, memo identity/printers/EXPLAIN/costing, and conservative transform guards. Top-level Filter EXISTS, NOT EXISTS, and IN decorrelate through proof-bearing memo rules; OR-contained leaves, NOT IN, and scalar forms stay materialized. Residual vectorized subqueries recursively execute once through the vectorized engine, scalar results compile as nullable constants, and IN sets use lookup-only typed hashes plus empty/NULL flags. Exact EXPLAIN goldens, a ten-mode 160-seed full-stack fuzzer, eager error equivalence, and a 100k-row selective-IN benchmark close the arc; the temporary lowering guard and oracle-only verifier path are gone.
24
-
22.Correlated subqueries (future). Define an explicit outer-reference scope model and correlation algebra before adding binding or execution. Phase 21 deliberately rejects correlated names; no decorrelation rule may infer correlation from unresolved identifiers.
23
+
21. Complete subquery arc. Delivered across Phase 21a/21b/21c: scalar-comparison, IN/NOT IN, and EXISTS/NOT EXISTS use immutable bound subplans with explicit lexical-depth correlation metadata. Empty correlation retains the eager once-per-query 3VL/cardinality model; correlated forms use the per-outer-row interpreted specification with nested/grandparent frames and row-ordered scalar errors. Explicit left SEMI/ANTI algebra has left-only output identity, deterministic interpreted/vectorized hash/NLJ execution, memo identity/printers/EXPLAIN/costing, and conservative guards. Uncorrelated and immediate equality-correlated top-level EXISTS, NOT EXISTS, and IN decorrelate through proof-bearing memo rules. Residual correlated forms remain oracle-defined and fail once at physical lowering; uncorrelated residuals still run vectorized recursively. Exact EXPLAIN goldens, eager/per-row error equivalence, and deterministic uncorrelated/correlated fuzz lanes close the story.
24
+
22.Null-aware anti join (future). Extend algebra and execution before considering NOT IN decorrelation; ordinary Anti remains intentionally insufficient for a NULL-bearing right set, where unmatched NOT IN is UNKNOWN rather than TRUE.
Copy file name to clipboardExpand all lines: docs/rewrite-rule-template.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,5 +6,6 @@ For every optimizer rule, include:
6
6
- Replacement expression.
7
7
- Semantic equivalence argument.
8
8
- Preconditions, especially around NULLs, duplicates, side effects, and ordering.
9
+
- For correlated rules, the explicit correlation-set/depth test, where every outer reference may occur, how substitution maps to join keys, and which residual/result-shaping locations block the rule.
9
10
- For predicate-tree rules, whether conjunct trees move as whole units, whether OR/AND splitting is forbidden, and what measure proves simplification or exploration terminates.
10
11
- Golden query that proves interpreted equality before/after rewrite.
0 commit comments