Skip to content

Commit 7275b6d

Browse files
committed
docs: update CLAUDE.md
1 parent 399bf0b commit 7275b6d

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ This split mirrors sqlglot's own mypyc-compile refactor (parsers/generators spli
4444

4545
## Implementation Status
4646

47-
The dialect is complete at v0.3.1:
47+
The dialect is complete at v0.3.2:
4848
- **Parser**: ~65 functions explicitly mapped (date/time, string, aggregate, array, map); remainder inherited from Hive.
4949
- **Generator**: `TRANSFORMS` + named `_sql` methods for all major expression types; Hive handles the rest.
50-
- **Tests**: 39 test methods, 180+ subtests covering parse, round-trip, and cross-dialect transpilation.
50+
- **Tests**: 40 test methods, 186 subtests covering parse, round-trip, and cross-dialect transpilation.
5151

5252
## Key sqlglot patterns
5353

@@ -60,6 +60,14 @@ When adding generator transforms in `Generator.TRANSFORMS`, use `self.func(name,
6060
Tests use a `Validator` base class (inline in `tests/test_maxcompute.py`) mirroring sqlglot's pattern:
6161
- `validate_all(sql, write={dialect: expected})` — cross-dialect transpilation assertions
6262
- `assertIsInstance(parse_one(sql, read="maxcompute"), exp.SomeClass)` — parse node assertions
63+
- **`read=` must be a dict**`read={"spark": "LOCATE(...)"}`, not `read="spark"`. Bare string is silently ignored by `validate_all`.
64+
- **Pyright false positive**`assertIsNotNone(x)` does not narrow types in Pyright; `x.field` after it shows "attribute of None" errors that are noise, not real bugs.
65+
66+
**Development is test-driven (TDD).** For every fix or feature:
67+
1. Write the failing test first and run it to confirm it fails
68+
2. Implement the minimal change to make it pass
69+
3. Run the full suite to confirm no regressions
70+
4. Commit
6371

6472
Before writing `validate_all` assertions, probe actual output first:
6573
```bash

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)