Skip to content

test: validate all dialect Ref/keyword references resolve#2539

Open
benfdking wants to merge 1 commit into
mainfrom
test/validate-dialect-references
Open

test: validate all dialect Ref/keyword references resolve#2539
benfdking wants to merge 1 commit into
mainfrom
test/validate-dialect-references

Conversation

@benfdking
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a test that walks every grammar entry in every dialect and checks that all Ref references actually resolve to entries in the dialect's library
  • Covers keyword refs, segment/grammar refs, bracket pair refs, terminators, excludes, and delimiters
  • Currently finds 263 unresolved references across 8 dialects (sqlite: 97, trino: 90, bigquery: 32, redshift: 17, snowflake: 15, oracle: 10, postgres: 1, duckdb: 1) — mostly keywords removed from child dialect keyword sets but still referenced in inherited grammar

Test plan

  • Fix unresolved references incrementally per-dialect
  • Once all 263 are resolved, test passes green in CI

🤖 Generated with Claude Code

Walks every grammar entry in every dialect and checks that all Ref
references (including keywords, bracket pairs, terminators, excludes,
and delimiters) point to names that actually exist in the dialect's
library. Currently finds 263 unresolved references across 8 dialects
to be fixed incrementally.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark for 8d5a2d4

Click to view benchmark
Test Base PR %
DepthMap::from_parent 59.4±0.85µs 60.9±1.51µs +2.53%
fix_complex_query 11.9±0.09ms 12.0±0.47ms +0.84%
fix_superlong 154.7±2.93ms 166.5±4.91ms +7.63%
parse_complex_query 4.3±0.09µs 4.3±0.05µs 0.00%
parse_expression_recursion 7.1±0.10µs 7.3±0.07µs +2.82%
parse_simple_query 1069.5±12.68ns 1094.5±30.06ns +2.34%

benfdking added a commit that referenced this pull request Apr 12, 2026
Already ported - SQLite dialect already sets FetchClauseSegment to Nothing
and has SELECT LIMIT test fixtures. Bumping SHA only.

Ported from SQLFluff 18e15780904ad9931f12ced01924a95ac8d8de00
sqlfluff/sqlfluff#4566
sqlfluff/sqlfluff@18e1578

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
benfdking added a commit that referenced this pull request Apr 12, 2026
chore: port SQLite SELECT LIMIT fix (#4566) (#2539)

Already ported - SQLite dialect already sets FetchClauseSegment to Nothing
and has SELECT LIMIT test fixtures. Bumping SHA only.

Ported from SQLFluff 18e15780904ad9931f12ced01924a95ac8d8de00
sqlfluff/sqlfluff#4566
sqlfluff/sqlfluff@18e1578

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant