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
- Remove Todo field from testMetadata struct in parser_test.go
- Remove -check-skipped flag and related logic
- Remove todo key from 146 metadata.json files
- Update cmd/next-test to only support -format flag
- Update CLAUDE.md documentation
The explain_todo key now provides more granular control for
skipping specific statement tests within a test case.
Copy file name to clipboardExpand all lines: CLAUDE.md
+3-32Lines changed: 3 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,6 @@
2
2
3
3
## Next Steps
4
4
5
-
To find the next test to work on, run:
6
-
7
-
```bash
8
-
go run ./cmd/next-test
9
-
```
10
-
11
-
This tool finds all tests with `todo: true` in their metadata and returns the one with the shortest `query.sql` file.
12
-
13
5
To find the next format roundtrip test to work on, run:
14
6
15
7
```bash
@@ -18,18 +10,6 @@ go run ./cmd/next-test -format
18
10
19
11
This finds tests with `todo_format: true` in their metadata.
20
12
21
-
## Workflow
22
-
23
-
1. Run `go run ./cmd/next-test` to find the next test to implement
24
-
2. Check the test's `query.sql` to understand what ClickHouse SQL needs parsing
25
-
3. Check the test's `explain.txt` to understand the expected EXPLAIN output
26
-
4. Implement the necessary AST types in `ast/`
27
-
5. Add parser logic in `parser/parser.go`
28
-
6. Update the `Explain()` function if needed to match ClickHouse's output format
29
-
7. Enable the test by removing `todo: true` from its `metadata.json` (set it to `{}`)
30
-
8. Run `go test ./parser/... -timeout 5s` to verify
31
-
9. Check if other todo tests now pass (see below)
32
-
33
13
## Running Tests
34
14
35
15
Always run parser tests with a 5 second timeout:
@@ -40,16 +20,6 @@ go test ./parser/... -timeout 5s
40
20
41
21
The tests are very fast. If a test is timing out, it indicates a bug (likely an infinite loop in the parser).
42
22
43
-
## Checking for Newly Passing Todo Tests
44
-
45
-
After implementing parser changes, run:
46
-
47
-
```bash
48
-
go test ./parser/... -check-skipped -v 2>&1| grep "PASSES NOW"
49
-
```
50
-
51
-
Tests that output `PASSES NOW` can have their `todo` flag removed from `metadata.json`. This helps identify when parser improvements fix multiple tests at once.
52
-
53
23
## Checking for Newly Passing Format Tests
54
24
55
25
After implementing format changes, run:
@@ -64,14 +34,15 @@ Tests that output `FORMAT PASSES NOW` can have their `todo_format` flag removed
64
34
65
35
Each test in `parser/testdata/` contains:
66
36
67
-
-`metadata.json` - `{}` for enabled tests, `{"todo": true}` for pending tests
0 commit comments