Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7a83df6
fix(syntax): keep DEFAULT, column COMMENT and column constraint prope…
kvlonge Nov 5, 2026
fac5970
test(syntax): pin DEFAULT, column COMMENT and RELY/FK-name trees for …
kvlonge Nov 5, 2026
aaff34d
fix(syntax): check Snowflake COPY INTO and COPY FILES against the rec…
kvlonge Nov 5, 2026
6de5388
fix(syntax): RESAMPLE interval stops before METADATA_COLUMNS; AFTER M…
kvlonge Nov 5, 2026
8319a16
fix(syntax): AFTER MATCH SKIP TO NEXT reads NEXT as the symbol in Sno…
kvlonge Nov 6, 2026
efd6ce9
Merge remote-tracking branch 'origin/main' into wip/parser-snowflake-…
kvlonge Nov 6, 2026
55b319a
parser: Snowflake query verdicts for FROM calls, joins, SAMPLE, VALUE…
kvlonge Nov 6, 2026
9bf5761
parser: Snowflake DML verdicts for MERGE ALL BY NAME, DELETE and stag…
kvlonge Nov 6, 2026
7d97041
parser: check Snowflake CREATE SEMANTIC VIEW against its grammar
kvlonge Nov 6, 2026
80fbf04
parser: check Snowflake CREATE EXTERNAL TABLE against its grammar
kvlonge Nov 6, 2026
b0e34f4
parser: check Snowflake CREATE DYNAMIC ICEBERG TABLE and CREATE INTER…
kvlonge Nov 6, 2026
4fa6b74
parser: accept the Snowflake function properties the recorded receipt…
kvlonge Nov 6, 2026
63a89cb
parser: check Snowflake CREATE DATABASE and CREATE SCHEMA properties …
kvlonge Nov 6, 2026
553bf77
parser: keep a Snowflake CREATE TABLE with policies or table properti…
kvlonge Nov 6, 2026
5644375
parser: refuse incomplete Snowflake constraint clauses and table WITH…
kvlonge Nov 6, 2026
c22e366
parser: check Snowflake ALTER tag, contact and policy actions against…
kvlonge Nov 6, 2026
4730b1b
parser: parse a Snowflake ALTER TABLE ALTER ( <column action> , ... )…
kvlonge Nov 6, 2026
bf850d1
Merge remote-tracking branch 'origin/main' into wip/parser-snowflake-…
kvlonge Nov 6, 2026
e800382
parser: settle the Snowflake receipts the branch had come to contradict
kvlonge Nov 6, 2026
5de770e
Merge remote-tracking branch 'origin/main' into wip/parser-snowflake-…
kvlonge Nov 6, 2026
110dd0d
fix(syntax): keep faithful governance trees structured; context rules…
kvlonge Nov 6, 2026
a4da433
Merge remote-tracking branch 'origin/main' into wip/parser-snowflake-…
kvlonge Nov 6, 2026
552b9c1
coverage: re-record the syntax baseline for the Snowflake parser batc…
kvlonge Nov 6, 2026
6a08b06
coverage: re-review INSERT at the Snowflake parser batch's parser tree
kvlonge Nov 7, 2026
1b2354f
coverage: re-record the syntax baseline with INSERT re-reviewed
kvlonge Nov 7, 2026
80298ff
Merge remote-tracking branch 'origin/main' into wip/parser-snowflake-…
kvlonge Nov 7, 2026
8222df0
Merge main into the Snowflake parser grammar checks
kvlonge Nov 7, 2026
daa6d4f
Merge main into the Snowflake parser grammar checks
kvlonge Nov 7, 2026
ec78a1a
Merge main into the Snowflake parser batch
kvlonge Nov 7, 2026
a7450f1
coverage: re-record the syntax baseline after merging main
kvlonge Nov 7, 2026
191ff80
refactor(syntax): move the WITH clause parser beside the statement it…
kvlonge Nov 7, 2026
55e8918
coverage: re-record the syntax baseline on the moved WITH clause parser
kvlonge Nov 7, 2026
7b263f1
Merge main into the Snowflake parser batch
kvlonge Nov 7, 2026
bd81bf6
Merge main into the Snowflake parser batch
kvlonge Nov 7, 2026
6731247
coverage: re-record the syntax baseline after merging the shared pars…
kvlonge Nov 7, 2026
8c237f7
Merge main into the Snowflake parser batch
kvlonge Nov 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions corpora/polyglot-check/expected_differences.toml
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,41 @@ dialects = ["Snowflake"]
sqlquack_error = "Expected AS before the CTE body"
note = "prose read as a CTE without AS; polyglot fails here too, with another error"

[[rejection]]
id = "snowflake_copy_prose_into_with"
sql = "COPY INTO with ? source failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected a table name"
note = "an assertion message read as a COPY; the COPY grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_copy_prose_on_error"
sql = "COPY ON_ERROR=? failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected INTO after COPY"
note = "an assertion message read as a COPY; the COPY grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_copy_prose_reversed"
sql = "COPY reversed param order failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected INTO after COPY"
note = "an assertion message read as a COPY; the COPY grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_copy_prose_minimal"
sql = "COPY minimal with ? source failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected INTO after COPY"
note = "an assertion message read as a COPY; the COPY grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_copy_prose_roundtrip"
sql = "COPY roundtrip failed to re-parse: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected INTO after COPY"
note = "an assertion message read as a COPY; the COPY grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_reserved_cte_name"
sql = "WITH all AS (SELECT 1 AS count) SELECT all.count FROM all"
Expand All @@ -891,6 +926,34 @@ dialects = ["Snowflake"]
sqlquack_error = "Reserved word TABLE cannot be an unquoted object name"
note = "TABLE is a Snowflake reserved word, so it cannot name a table unquoted"

[[rejection]]
id = "snowflake_copy_unload_reserved_table_credentials"
sql = "COPY INTO 's3://example/data.csv'\n FROM EXTRA.EXAMPLE.TABLE\n CREDENTIALS = ()\n FILE_FORMAT = (TYPE = CSV COMPRESSION = NONE NULL_IF = ('') FIELD_OPTIONALLY_ENCLOSED_BY = '\"')\n HEADER = TRUE\n OVERWRITE = TRUE\n SINGLE = TRUE\n "
dialects = ["Snowflake"]
sqlquack_error = "Expected a table name"
note = "TABLE is a Snowflake reserved word, so it cannot be the unquoted last part of the unloaded table's name either; Snowflake refuses d1.s1.SELECT as an object name with syntax error 1003 (DEFINE STREAM d1.s1.v1 ON TABLE d1.s1.SELECT and DEFINE SEQUENCE d1.s1.SELECT)"

[[rejection]]
id = "snowflake_copy_unload_reserved_table_credentials_flat"
sql = "COPY INTO 's3://example/data.csv'\nFROM EXTRA.EXAMPLE.TABLE\nCREDENTIALS = ()\nFILE_FORMAT = (TYPE=CSV COMPRESSION=NONE NULL_IF=(\n ''\n) FIELD_OPTIONALLY_ENCLOSED_BY='\"')\nHEADER = TRUE\nOVERWRITE = TRUE\nSINGLE = TRUE"
dialects = ["Snowflake"]
sqlquack_error = "Expected a table name"
note = "TABLE is a Snowflake reserved word, so it cannot be the unquoted last part of the unloaded table's name either; Snowflake refuses d1.s1.SELECT as an object name with syntax error 1003 (DEFINE STREAM d1.s1.v1 ON TABLE d1.s1.SELECT and DEFINE SEQUENCE d1.s1.SELECT)"

[[rejection]]
id = "snowflake_copy_unload_reserved_table_integration"
sql = "COPY INTO 's3://example/data.csv'\n FROM EXTRA.EXAMPLE.TABLE\n STORAGE_INTEGRATION = S3_INTEGRATION\n FILE_FORMAT = (TYPE=CSV COMPRESSION=NONE NULL_IF=('') FIELD_OPTIONALLY_ENCLOSED_BY='\"')\n HEADER = TRUE\n OVERWRITE = TRUE\n SINGLE = TRUE\n "
dialects = ["Snowflake"]
sqlquack_error = "Expected a table name"
note = "TABLE is a Snowflake reserved word, so it cannot be the unquoted last part of the unloaded table's name either; Snowflake refuses d1.s1.SELECT as an object name with syntax error 1003 (DEFINE STREAM d1.s1.v1 ON TABLE d1.s1.SELECT and DEFINE SEQUENCE d1.s1.SELECT)"

[[rejection]]
id = "snowflake_copy_unload_reserved_table_integration_flat"
sql = "COPY INTO 's3://example/data.csv' FROM EXTRA.EXAMPLE.TABLE STORAGE_INTEGRATION = S3_INTEGRATION FILE_FORMAT = (TYPE=CSV COMPRESSION=NONE NULL_IF=('') FIELD_OPTIONALLY_ENCLOSED_BY='\"') HEADER = TRUE OVERWRITE = TRUE SINGLE = TRUE"
dialects = ["Snowflake"]
sqlquack_error = "Expected a table name"
note = "TABLE is a Snowflake reserved word, so it cannot be the unquoted last part of the unloaded table's name either; Snowflake refuses d1.s1.SELECT as an object name with syntax error 1003 (DEFINE STREAM d1.s1.v1 ON TABLE d1.s1.SELECT and DEFINE SEQUENCE d1.s1.SELECT)"

[[rejection]]
id = "snowflake_empty_call_argument"
sql = "SELECT ROUND(SCALE => 1, EXPR => 2.25, , ROUNDING_MODE => 'HALF_TO_EVEN') AS value"
Expand All @@ -905,6 +968,90 @@ dialects = ["Snowflake"]
sqlquack_error = "Snowflake does not accept a bare VALUES list as the body of CTE 'T'"
note = "Snowflake takes VALUES only in FROM; polyglot added this rule after SQLQuack's fork (rev 8767d68), with the same message"

[[rejection]]
id = "snowflake_table_unset_projection_policy"
sql = "ALTER TABLE t UNSET PROJECTION POLICY"
dialects = ["Snowflake"]
sqlquack_error = "Expected the end of the statement"
note = "Snowflake refuses UNSET PROJECTION POLICY on a table, which takes it only on a column (recorded errno 1003)"

[[rejection]]
id = "snowflake_put_prose_with_quoted_file_uri"
sql = "PUT with quoted file URI failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected a file:// source and then the stage"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_placeholder"
sql = "PUT with ? placeholder failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected an option after the location"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_quoted_stage"
sql = "PUT with quoted stage failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected a file:// source and then the stage"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_minimal_with"
sql = "PUT minimal with ? failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected a file:// source and then the stage"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_roundtrip"
sql = "PUT roundtrip failed to re-parse: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected a file:// source and then the stage"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_dollar_quoted_stage_target"
sql = "PUT with dollar-quoted stage target failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected a file:// source and then the stage"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_uuid_name_path"
sql = "PUT with @~/UUID/name path failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected an option after the location"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_uuid_compressupload_path"
sql = "PUT with @~/UUID/compressUpload path failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected an option after the location"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_stage_uuid_auto_compress_false"
sql = "PUT with @stage/UUID AUTO_COMPRESS=FALSE failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected an option after the location"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_stage_uuid_auto_compress_true"
sql = "PUT with @stage/UUID AUTO_COMPRESS=TRUE failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected an option after the location"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_put_prose_with_long_path_stage_uuid"
sql = "PUT with long path + @stage/UUID failed: {:?}"
dialects = ["Snowflake"]
sqlquack_error = "Expected a file:// source and then the stage"
note = "an assertion message read as a PUT; the PUT grammar check refuses it before polyglot's parser fails on it with another error"

[[rejection]]
id = "snowflake_empty_select_list"
sql = "SELECT"
Expand Down
Loading
Loading