Skip to content

chore(dialects): move sqlglot dialects to top-level package#378

Open
cofin wants to merge 2 commits intomainfrom
chore/dialect-reorg
Open

chore(dialects): move sqlglot dialects to top-level package#378
cofin wants to merge 2 commits intomainfrom
chore/dialect-reorg

Conversation

@cofin
Copy link
Member

@cofin cofin commented Mar 8, 2026

Summary

  • Moves custom sqlglot dialect definitions (Spanner, Spangres) from sqlspec/adapters/spanner/dialect/ to a new top-level sqlspec/dialects/ package
  • Dialects are driver-agnostic — centralizing them allows reuse across adapters (asyncpg, psycopg, psqlpy, etc.)
  • Adds sqlspec/dialects/postgres/ as a landing zone for PR feat: Postgres extension dialect support #359 (PGVector/ParadeDB extension dialects)
  • Adds mypyc exclusion for sqlspec/dialects/** (sqlglot's Dialect uses a custom metaclass incompatible with mypyc)

Test plan

  • All 4514 unit tests pass
  • Dialect registration verified (Dialect.classes["spanner"] and ["spangres"] resolve correctly)
  • All imports updated — no re-export shims, clean break

cofin added 2 commits March 8, 2026 20:59
… package

Centralizes custom sqlglot dialect definitions so they are driver-agnostic
and reusable across adapters (e.g., Postgres extension dialects can be used
by asyncpg, psycopg, psqlpy). Prepares landing zone for PR #359.
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