Commit a797872
fix(tck): achieve 402/402 passing — fix regex, List1 indexing, and type validation
Three fixes that together bring the TCK from 383/402 → 402/402:
1. **List1 scenarios [3,5]: variable array index (0-based)**
- `to_sql_query.rs`: wrap non-literal array subscript indices with
`toInt64(...)+1` to convert Cypher 0-based → ClickHouse 1-based.
String-literal indices (map key access) are excluded.
- `tck.rs` (`given_parameters`): parameter tables have no header row —
remove the spurious `rows.next()` that was skipping the first param.
2. **List2 scenarios [1,2,3]: non-integer index type errors**
- `query_validation.rs`: new `find_invalid_array_subscript` pass detects
Boolean/Float/String/List/Map literal indices (direct or via WITH alias)
and rejects them with a TypeError at plan time.
3. **ReturnSkipLimit1 [6,8] + Return2 [15-17]: step regex and DELETE**
- `tck.rs` (`then_error_raised`): regex `(?:compile|runtime|any) time:`
failed to match TCK steps written as `at runtime: X` (no "time" word).
Fixed to `(?:compile|runtime|any)(?:\s+time)?:`.
- `tck.rs` (`when_executing_query`): detect DELETE keyword and raise an
error immediately — ClickGraph is read-only and previously silently
ignored DELETE, leaving world.error = None for Return2 [15-17].
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 3b8164d commit a797872
3 files changed
Lines changed: 149 additions & 10 deletions
File tree
- clickgraph-tck/tests
- src
- clickhouse_query_generator
- query_planner/analyzer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 173 | + | |
| 174 | + | |
178 | 175 | | |
179 | 176 | | |
180 | 177 | | |
| |||
201 | 198 | | |
202 | 199 | | |
203 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
204 | 213 | | |
205 | 214 | | |
206 | 215 | | |
| |||
238 | 247 | | |
239 | 248 | | |
240 | 249 | | |
| 250 | + | |
241 | 251 | | |
242 | 252 | | |
243 | 253 | | |
| |||
366 | 376 | | |
367 | 377 | | |
368 | 378 | | |
369 | | - | |
| 379 | + | |
370 | 380 | | |
371 | 381 | | |
372 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5131 | 5131 | | |
5132 | 5132 | | |
5133 | 5133 | | |
5134 | | - | |
| 5134 | + | |
| 5135 | + | |
| 5136 | + | |
| 5137 | + | |
| 5138 | + | |
5135 | 5139 | | |
5136 | 5140 | | |
5137 | 5141 | | |
5138 | | - | |
| 5142 | + | |
| 5143 | + | |
5139 | 5144 | | |
5140 | 5145 | | |
5141 | 5146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
11 | | - | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
17 | 123 | | |
18 | 124 | | |
19 | 125 | | |
| |||
25 | 131 | | |
26 | 132 | | |
27 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
28 | 152 | | |
29 | 153 | | |
30 | 154 | | |
| |||
0 commit comments