-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cubesql): Support Sigma Computing table schema sync
- Loading branch information
1 parent
0ea12c4
commit d87bd19
Showing
3 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...esql/cubesql/src/compile/snapshots/cubesql__compile__tests__sigma_computing_attnames.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
source: cubesql/src/compile/mod.rs | ||
expression: "execute_query(\"\n with\n nsp as (\n select oid as relnamespace\n from pg_catalog.pg_namespace\n where nspname = 'public'\n ),\n tbl as (\n select\n nsp.relnamespace as connamespace,\n tbl.oid as conrelid\n from pg_catalog.pg_class tbl\n inner join nsp using (relnamespace)\n where relname = 'emptytbl'\n ),\n con as (\n select\n conrelid,\n conkey\n from pg_catalog.pg_constraint\n inner join tbl using (connamespace, conrelid)\n where contype = 'p'\n )\n select attname\n from pg_catalog.pg_attribute att\n inner join con on\n conrelid = attrelid\n and attnum = any(con.conkey)\n order by attnum\n \".to_string(),\n DatabaseProtocol::PostgreSQL).await?" | ||
--- | ||
+---------+ | ||
| attname | | ||
+---------+ | ||
+---------+ |