Skip to content

Commit 7a065ff

Browse files
author
Dylan Bobby Storey
committed
metis: archive T-0306 — varlen alias-as-colref follow-on completed
Acceptance criteria all met: - Reproducer parses & runs ✓ - No regressions ✓ - 2/5 scenarios (Match7 [21]/[27]) flipped earlier (iter 9) - 3/5 scenarios (Match4 [8], Match9 [6]/[7]) flipped this iter via the var-length CTE fresh-internal-alias treatment. TCK delta over the ticket lifetime: ~+4 net (some scenarios moved to unmatched-row fails — semantic bound-list-vs-iterated-path not yet implemented, but the alias-as-table-alias parse error is fully gone).
1 parent c503c9b commit 7a065ff

1 file changed

Lines changed: 30 additions & 5 deletions

File tree

.metis/backlog/bugs/GQLITE-T-0306.md renamed to .metis/archived/backlog/bugs/GQLITE-T-0306.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ level: task
44
title: "OPTIONAL MATCH after WITH emits invalid SQL alias (uses column ref as table alias)"
55
short_code: "GQLITE-T-0306"
66
created_at: 2026-05-21T02:58:20.251410+00:00
7-
updated_at: 2026-05-21T02:58:20.251410+00:00
7+
updated_at: 2026-05-21T19:01:56.288678+00:00
88
parent:
99
blocked_by: []
10-
archived: false
10+
archived: true
1111

1212
tags:
1313
- "#task"
14-
- "#phase/backlog"
1514
- "#bug"
15+
- "#phase/completed"
1616

1717

1818
exit_criteria_met: false
@@ -70,10 +70,35 @@ construction bug.
7070

7171
## Acceptance Criteria
7272

73+
## Acceptance Criteria
74+
75+
## Acceptance Criteria
76+
7377
- [x] Reproducer query parses and runs without "near '.':" error
7478
- [x] No regression on existing OPTIONAL MATCH / WITH chain scenarios
7579
- [x] 2 of 5 TCK scenarios flipped error → fail (Match7 [21]/[27])
76-
- [ ] Remaining 3 (Match4 [8], Match9 [6]/[7]) still error — they use variable-length relationships, a different code path (`generate_varlen_cte`)
80+
- [x] Remaining 3 (Match4 [8], Match9 [6]/[7]) flipped error → pass
81+
or different fail — the var-length CTE join path no longer emits
82+
column-refs as table aliases.
83+
84+
## Status Updates
85+
86+
**2026-05-21 iter 50** — Var-length follow-on completed in commit
87+
c503c9b. Two coordinated changes in transform_match.c's varlen branch:
88+
89+
1. Detect alias-is-colref by substring `.` on edge_alias /
90+
target_alias (catches both alias_is_id=true and PROJECTED scalar
91+
alias forms).
92+
2. When edge alias is colref: substitute a fresh `_vp_inner_N`
93+
alias for the CTE JOIN; WHERE constraints use that alias.
94+
3. When target alias is colref: skip the `CROSS JOIN nodes AS <colref>`
95+
emission entirely. The column ref already IS the id so no new
96+
table is needed.
97+
98+
TCK delta: pass=3466 → 3468 (+2), errors=77 → 74 (-3). The one
99+
extra fail (Match9 [6]) moves to result-mismatch territory — the
100+
bound-list-vs-iterated-path semantic isn't matched against the
101+
specific rs list yet (filed as separate follow-on if needed).
77102

78103
## Status Updates
79104

@@ -99,4 +124,4 @@ analog need similar `alias_is_id`-aware skipping.
99124
## Discovered
100125

101126
2026-05-21 during iteration 9 of the open-work queue, after TCK
102-
stabilization (deterministic random()).
127+
stabilization (deterministic random()).

0 commit comments

Comments
 (0)