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
sqlite: CREATE TABLE ... AS SELECT creates a table with no columns #4683
In the SQLite engine, a table created with CREATE TABLE … AS SELECT ends up in the catalog with no columns. Any query that reads a column from it fails with column "…" does not exist. Both analysis paths are affected: the default analyzer and the core analyzer (SQLCEXPERIMENT=coreanalyzer).
PostgreSQL and DuckDB already support the same schema.
Expected: the table gets the columns of its SELECT (here id INTEGER, name TEXT), and the query generates a T2 model.
Relevant log output
# default analyzer
query.sql:2:8: column "id" does not exist
# SQLCEXPERIMENT=coreanalyzer
query.sql:1:1: unknown column "id"
Database schema
CREATETABLEt (id INTEGERPRIMARY KEY, name TEXTNOT NULL, score INTEGERNOT NULL, created TEXT);
CREATETABLEt2ASSELECT id, name FROM t;
Activity