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 3a98211
Browse filesBrowse the repository at this point in the historyBrowse files
fix: address automated review findings in PostgreSQL parsing and execution
Avoid recursive expression allocation while probing a generic typed literal:
scan modifier tokens first and validate expressions only when a following string
confirms a type prefix. Ordinary nested calls now fit a bounded arena instead
of exhausting it around fourteen levels. Preserve PostgreSQL operator
precedence while allowing exact binary concatenation through the local
evaluator. Parse MySQL ROWS/RANGE frames while keeping GROUPS/EXCLUDE specific
to PostgreSQL and unsupported frame execution explicitly guarded.
Make emission tolerate missing children after public subtree removal. Store
aliases as undelimited token values with retained source spelling and delimiter
flags, including RETURNING and JOIN USING aliases. Preserve cloning,
parameterization and edited-identifier emission. Keep ONLY/inheritance target
names directly accessible under table references, restoring UPDATE/DELETE
metadata while retaining planner and parameterizer rejection of those features.
Accept PostgreSQL ColId names in COPY and transaction utilities, and reject
PREPARED after END/ABORT aliases. Dispatch RELEASE SAVEPOINT and ROLLBACK TO
through the correct transaction-manager operations, decoding quoted savepoint
names and folding unquoted PostgreSQL names. Require complete successful
parsing before transaction effects; reject unimplemented transaction options.
Preserve simple MySQL controls by consuming optional WORK and named SAVEPOINT
operands, and reject missing START TRANSACTION/SAVEPOINT operands.
Keep PostgreSQL LIMIT ALL/NULL unbounded and OFFSET NULL at zero. Reject local
limit expressions, negative counts and overflowing literals that cannot be
correctly evaluated, rather than extracting digits or silently treating them
as zero. Reject inputs larger than UINT32_MAX before scanning so public source
spans and offsets cannot wrap, without changing the 48-byte AST layout.
Correct stale README layout/test counts and generic-template guidance. Document
source/value mutation rules, existing identifier-escape representation, input
limits and local execution behavior. Do not apply the disputed DEFAULT-predicate
suggestion: parenthesized full expressions remain valid PostgreSQL syntax.
Unsupported DDL continues to report errors; this fix does not add an opaque
fallback or change the classification-status API.
Validation:
- Red/green regressions for all ten confirmed functional findings and oversized
input handling; independent review fixed a MySQL transaction compatibility
issue before completion.
- Forced full build, then rebuild of every parameterizer-dependent test after
final integration correction: 1,514 passed, 37 external-database tests skipped;
corpus-test executable built.
- ASan/UBSan and leak detection: 20 new tests and 32 AST regression tests passed.
- Compatibility harness: 87 tests passed. Pinned original-source corpus gained
three deeply supported statements with zero lost cases (49,848/51,415).
- All three additions and 653 affected existing alias/DML corpus statements
reconstruct to equivalent PostgreSQL raw ASTs, stripping only source positions.
- Existing PostgreSQL parser benchmark smoke ran; no timing claims or benchmark
sources, reports, or benchmark-only README/.gitignore changes are committed.
The correctness snapshot follows in a separate commit.
Copy file name to clipboardExpand all lines: CLAUDE.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
@@ -50,7 +50,7 @@ Full benchmark + corpus report: `bash scripts/run_benchmarks.sh report.md`.
50
50
51
51
### Namespace
52
52
53
-
Everything parser-side is in `namespace sql_parser`. All templates are parameterized on`Dialect D`.
53
+
Everything parser-side is in `namespace sql_parser`. Templates with dialect-specific behavior use`Dialect D`; dialect-independent generic helpers are exempt.
54
54
55
55
### Adding a new deep parser
56
56
@@ -242,7 +242,7 @@ Subclass `TransactionManager`. Provide `begin()/commit()/rollback()` semantics;
242
242
243
243
## Tests
244
244
245
-
Google Test. 1,160 tests across 50 test files. Validated against 86K+ external queries from 9 corpora (99.92% fully parsed).
245
+
Google Test. Run `make test` for the current test totals. Validated against 86K+ external queries from 9 corpora (99.92% fully parsed).
246
246
247
247
Run a single test: `./run_tests --gtest_filter="*WindowFunc*"`.
0 commit comments