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
Commit f699524
Browse filesBrowse the repository at this point in the historyBrowse files
Add two engines to goldeneye, each generating relations.jsonl from a live
database and checking the engine's analyze cases against it.
mssql reads a SQL Server named by MSSQL_SERVER_URI: relations.jsonl is
every view of sys and INFORMATION_SCHEMA as the server describes a
SELECT * from it, listed from a scratch user database. The analyze check
describes each query without running it: result columns from
sys.dm_exec_describe_first_result_set, parameter types from
sp_describe_undeclared_parameters, and the column a parameter is
compared with or assigned to from the estimated showplan.
spanner reads a Spanner Omni server named by SPANNER_SERVER_URI, the
gRPC endpoint of the spanner-omni container image, and writes into the
googlesql dialect: relations.jsonl is every view of INFORMATION_SCHEMA
and SPANNER_SYS. The analyze check creates a database per case and
compiles each query in PLAN mode, taking columns and parameter types
from the result metadata and provenance from the query plan.
Both engines get a gen workflow job, a docker-compose service and a
README section. Generating the dialects and running the checks turned
up a few things in sqlc and its cases:
- A rowversion or sysname column is NOT NULL unless declared nullable,
which the SQL Server converter now does.
- SQL Server rejects CAST to an alias type and a comparison of vector
values, and Spanner requires a length on STRING, rejects NUMERIC(p,s),
BIGNUMERIC, GEOGRAPHY, INTERVAL and STRUCT columns and cannot return a
STRUCT as a column, so the analyze cases are rewritten to what each
database accepts; the BigQuery-flavoured types case is kept as
analyze_types/bigquery, which the Spanner check does not read.
- The GoogleSQL dialect gains a proto type, which SPANNER_SYS has a
column of.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7cPsawATXMfiYqWg8nBVb
0 commit comments