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
core: analyze every dialect through the new analysis core
`sqlc analyze` ran ClickHouse and GoogleSQL on the core catalog and
analyzer while PostgreSQL, MySQL and SQLite still went through the legacy
compiler. This routes all five dialects through the core.
- compiler: NewCompiler takes options; WithCoreAnalysis, which the analyze
command passes, builds a core catalog seeded with the engine's dialect
and skips the legacy catalog and the analyzer connection entirely.
ClickHouse and GoogleSQL keep doing so unconditionally. `generate`,
`vet` and `compile` are untouched.
- core/seed: a declarative description of a dialect — its types and their
aliases, the operators and casts between them, and the functions it
ships with — that Apply turns into catalog rows. PostgreSQL, MySQL and
SQLite seeds are built on it, reusing each engine's existing function
catalog (pg_catalog and the MySQL and SQLite stdlibs).
- core: literals take the type each dialect names rather than PostgreSQL's,
a type a schema declares gains the dialect's comparison operators, and
array types are named after their element.
- core/schema: enums, functions, views, CREATE TABLE AS, ALTER TABLE and
the rename statements now load into the catalog, and a column's array-ness
is read from either the type name or the column.
- core/analyzer: CTEs, set operations, subqueries in FROM and as
expressions, correlated references, functions in FROM, IN, BETWEEN, CASE,
COALESCE, array expressions, casts and output-name references in GROUP BY
and HAVING. Overloads are chosen by argument type, polymorphic return
types resolve to the argument's, and an unknown function or operator
leaves the expression untyped instead of failing the query.
The SQLite golden changes because the core reports the type name the
catalog stores, which is lower case.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011MnoUabwBWW9gaEn2Nj7eG
0 commit comments