Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
948 changes: 808 additions & 140 deletions coverage/syntax/baseline.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions coverage/syntax/held.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -618,3 +618,11 @@
{"case_id": "sf.functions.system-evaluate-data-quality-expectations-persist-result.k88869f41b595", "family": "functions", "reason": "a DDL statement recorded in a run database (receipt capture execute_ddl_in_run_database); runs in a run database"}
{"case_id": "sf.functions.system-evaluate-data-quality-expectations-persist-result.kacd38185b5db", "family": "functions", "reason": "a DDL statement recorded in a run database (receipt capture execute_ddl_in_run_database); runs in a run database"}
{"case_id": "sf.functions.system-evaluate-data-quality-expectations-persist-result.kcaa1c4d2428d", "family": "functions", "reason": "a DDL statement recorded in a run database (receipt capture execute_ddl_in_run_database); runs in a run database"}
{"calls": ["a stage path that needs a current database to resolve"], "case_id": "sf.dml.copy-files.from-select-from.k2232400063c1", "expect": "observe", "family": "dml", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
{"calls": ["a stage path that needs a current database to resolve"], "case_id": "sf.dml.copy-files.from-select-from.ke02b3a7190c8", "expect": "observe", "family": "dml", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
{"calls": ["a stage path that needs a current database to resolve"], "case_id": "sf.dml.copy-files.from.k10c897cca12a", "expect": "observe", "family": "dml", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
{"calls": ["a stage path that needs a current database to resolve"], "case_id": "sf.dml.copy-files.from.k5df6587b8f13", "expect": "observe", "family": "dml", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
{"calls": ["a stage path that needs a current database to resolve"], "case_id": "sf.dml.copy-into-location.k3decf982dfdd", "expect": "observe", "family": "dml", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
{"calls": ["a stage path that needs a current database to resolve"], "case_id": "sf.dml.copy-into-location.ke84dfd53053b", "expect": "observe", "family": "dml", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
{"calls": ["a stage path that needs a current database to resolve"], "case_id": "sf.query.from.k6198154838c3", "expect": "observe", "family": "query", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
{"calls": ["a semantic view reference that needs a current database to resolve"], "case_id": "sf.query.semantic-view.k346000861414", "expect": "observe", "family": "query", "packet_revision": "c44bdb317ec71a638508e300fb96d1cde73b862a", "reason": "run in a run database: a session without a current database answers errno 90105"}
230 changes: 230 additions & 0 deletions coverage/syntax/limits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83066,3 +83066,233 @@ anchor = "doc.data-types-datetime / Date and time constants"
sql = "SELECT TIME WITH TIME ZONE '03:04:05' ;"
expect = "observe"
context = "raw"

# The JOIN usage note: a read-order clause follows ON or USING; without one, FIRST or LAST is read as an alias for
# the second table. The derived read-order cases have neither, so these rows carry USING, and four rows observe the
# alias reading itself.

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "alternative"
target = "{ FIRST | LAST } → FIRST"
reason = "without USING the generated case reads FIRST ( v1 ) as a table alias (errno 2003, not 1868); the row below carries USING so the read-order clause is parsed"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "alternative"
target = "{ FIRST | LAST } → FIRST"
note = "FIRST after USING, a read-order clause"
anchor = "doc.constructs.join / Usage notes"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST ( v1 ) ;"
context = "raw"
expect = "accept"

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "alternative"
target = "{ FIRST | LAST } → LAST"
reason = "without USING the generated case reads LAST ( v1 ) as a table alias; the row below carries USING"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "alternative"
target = "{ FIRST | LAST } → LAST"
note = "LAST after USING, a read-order clause"
anchor = "doc.constructs.join / Usage notes"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) LAST ( v1 ) ;"
context = "raw"
expect = "accept"

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "required_operand_missing"
target = "<alias> in [ { FIRST | LAST } ( <alias> ) ]"
reason = "without USING the generated case is an empty column-alias list; the row below carries USING"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "required_operand_missing"
target = "<alias> in [ { FIRST | LAST } ( <alias> ) ]"
note = "omit <alias> in a read-order clause after USING"
anchor = "doc.constructs.join / Syntax"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST ( ) ;"
context = "raw"
expect = "reject"

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "negative_neighbour"
target = "<alias> in [ { FIRST | LAST } ( <alias> ) ]"
note = "a string literal in place of <alias>"
reason = "without USING the generated case is a literal in a column-alias list; the row below carries USING"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "negative_neighbour"
target = "<alias> in [ { FIRST | LAST } ( <alias> ) ]"
note = "a string literal in place of <alias> in a read-order clause after USING"
anchor = "doc.constructs.join / Syntax"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST ( 'v1' ) ;"
context = "raw"
expect = "reject"

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "negative_neighbour"
note = "the form without its required ( in [ { FIRST | LAST } ( <alias> ) ]"
reason = "without USING the generated case does not reach a read-order clause; the row below carries USING"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "negative_neighbour"
note = "a read-order clause after USING without its ("
anchor = "doc.constructs.join / Syntax"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST v1 ) ;"
context = "raw"
expect = "reject"

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "negative_neighbour"
note = "the form without its required ) in [ { FIRST | LAST } ( <alias> ) ]"
reason = "without USING the generated case is an unclosed column-alias list; the row below carries USING"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "negative_neighbour"
note = "a read-order clause after USING without its )"
anchor = "doc.constructs.join / Syntax"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST ( v1 ;"
context = "raw"
expect = "reject"

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "identifier_class"
target = "<alias>"
note = "quoted: a double-quoted identifier with blanks and mixed case"
reason = "without USING the generated case is a quoted column alias; the row below carries USING"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "identifier_class"
target = "<alias>"
note = "quoted <alias> in a read-order clause after USING"
anchor = "doc.identifiers-syntax"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST ( \"v1 Q\" ) ;"
context = "raw"
expect = "accept"

[[suppress]]
form = "sf.query.join.join.syntax"
kind = "identifier_class"
target = "<alias>"
note = "reserved: a reserved keyword, unquoted (expected rejection) and double-quoted (expected acceptance)"
reason = "without USING the generated cases are column aliases; the row below carries USING"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "identifier_class"
target = "<alias>"
note = "reserved <alias> in a read-order clause after USING, unquoted and double-quoted"
anchor = "doc.identifiers-syntax"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST ( SELECT ) ;"
context = "raw"
expect = "reject"
also_sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 USING ( v1 ) FIRST ( \"SELECT\" ) ;"
also_expect = "accept"

# Alias-reading pins from the usage note; observed, not read-order obligations.
[[limit]]
form = "sf.query.join.join.syntax"
kind = "positive"
note = "FIRST ( v1 ) on a directed join without ON or USING, read as a table alias"
anchor = "doc.constructs.join / Usage notes"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 FIRST ( v1 ) ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "negative_neighbour"
note = "FIRST ( v1 ) after a table that already has an alias, without ON or USING"
anchor = "doc.constructs.join / Usage notes"
sql = "SELECT * FROM t1 INNER DIRECTED JOIN t2 AS x FIRST ( v1 ) ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "positive"
note = "a read-order clause on a join that is not directed (expected errno 1867)"
anchor = "doc.constructs.join / Usage notes"
sql = "SELECT * FROM t1 JOIN t2 USING ( v1 ) FIRST ( v1 ) ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.query.join.join.syntax"
kind = "positive"
note = "a bare FIRST as a table alias; FIRST is not reserved"
anchor = "doc.constructs.join / Usage notes"
sql = "SELECT * FROM t1 JOIN t2 FIRST ;"
context = "raw"
expect = "observe"

# Shapes the grammar review asked Snowflake about: options before FROM, a subquery source, a positional
# argument, chained joins and DIMENSIONS before METRICS. The pages do not say whether each is syntax, so
# each is observed.

[[limit]]
form = "sf.utility.execute-job-service"
kind = "positive"
note = "NAME and ASYNC before the specification, observed"
anchor = "doc.sql.execute-job-service / Syntax"
sql = "EXECUTE JOB SERVICE IN COMPUTE POOL v1 NAME = v1 ASYNC = TRUE FROM @s1 SPECIFICATION_FILE = 'm' ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.dml.merge"
kind = "positive"
note = "a subquery as the source, with an alias, observed"
anchor = "doc.sql.merge / Syntax"
sql = "MERGE INTO v1 USING ( SELECT c1 FROM t2 ) AS s1 ON v1.c1 = s1.c1 WHEN MATCHED THEN DELETE ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.utility.call-with.language-javascript-as-call"
kind = "positive"
note = "a positional argument in the CALL, observed"
anchor = "doc.sql.call-with / Syntax / JavaScript"
sql = "WITH v1 AS PROCEDURE ( v1 INT ) RETURNS INT LANGUAGE JAVASCRIPT AS 'm' CALL v1 ( 1 ) ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.query.join.join"
kind = "positive"
note = "two joins in a row, each with ON, observed"
anchor = "doc.constructs.join / Syntax"
sql = "SELECT 1 FROM t1 JOIN t2 ON t1.c1 = t2.c1 JOIN t3 ON t2.c1 = t3.c1 ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.query.join.join-2"
kind = "positive"
note = "a NATURAL join followed by a CROSS join, observed"
anchor = "doc.constructs.join / Syntax"
sql = "SELECT 1 FROM t1 NATURAL JOIN t2 CROSS JOIN t3 ;"
context = "raw"
expect = "observe"

[[limit]]
form = "sf.query.semantic-view"
kind = "positive"
note = "DIMENSIONS before METRICS, observed"
anchor = "doc.constructs.semantic_view / Syntax"
sql = "SELECT * FROM SEMANTIC_VIEW ( v1 DIMENSIONS 1 METRICS 1 ) ;"
context = "raw"
expect = "observe"
2 changes: 2 additions & 0 deletions coverage/syntax/marks/dml.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,15 @@
{"case_id":"sf.dml.list.repositoryclone.k6adf62681177","mark":"settled accept","obligations":["sf.dml.list.repositoryclone.o008"],"sql_sha256":"6adf6268117709d78271ad887227ee9cd0e7c94bdc8621ae0c226fe0511e6bca"}
{"case_id":"sf.dml.list.repositoryclone.k9fc5e77087ee","mark":"settled reject","obligations":["sf.dml.list.repositoryclone.o027"],"sql_sha256":"9fc5e77087ee03a58ceee0f20f8a9419465e279c38b90745a7aa304d613c68a6"}
{"case_id":"sf.dml.list.repositoryclone.ke83bee11a048","mark":"settled accept","obligations":["sf.dml.list.repositoryclone.o026"],"sql_sha256":"e83bee11a048855fe30ced2b0904d328ba0088318d70fecd356615f7e7ed0f89"}
{"case_id":"sf.dml.merge.k0f0c34d58853","mark":"settled accept","obligations":["sf.dml.merge.o106"],"sql_sha256":"0f0c34d588531d7397a288918fbf150522c2fa6df2620c0b2f25041009e63180"}
{"case_id":"sf.dml.merge.k68bcb187ad7d","mark":"settled accept","obligations":["sf.dml.merge.o083"],"sql_sha256":"68bcb187ad7de60005c39d2942647d0cab1dde55059a2dc070bfdbbeac59468d"}
{"case_id":"sf.dml.merge.kaf67ed892c3f","mark":"settled accept","obligations":["sf.dml.merge.o088"],"sql_sha256":"af67ed892c3fb637b3926e8e8bccd5e78c9b9b3e923f68724f5ed7f86da6c3a1"}
{"case_id":"sf.dml.merge.kc1ef09ba7248","mark":"settled accept","obligations":["sf.dml.merge.o089"],"sql_sha256":"c1ef09ba724833c4d875bc0f1e5d8564943cf0307fcb0bd8946c1bee50b39348"}
{"case_id":"sf.dml.merge.kcae68ea1138f","mark":"settled accept","obligations":["sf.dml.merge.o084"],"sql_sha256":"cae68ea1138f7095da9391b1e443eae0626ca97145d31fb715d351236ad7ab7f"}
{"case_id":"sf.dml.put.k1138f842a68a","mark":"settled accept","obligations":["sf.dml.put.o108"],"sql_sha256":"1138f842a68a3d1fa02a6de0a5a6ece7bbbd992ca30a1dbecc2550ab0fb80ef2"}
{"case_id":"sf.dml.put.k2272e578198e","mark":"settled accept","obligations":["sf.dml.put.o109"],"sql_sha256":"2272e578198e9e9d464cba203ae46e5ee5025dd26779c106ea3823a431acf382"}
{"case_id":"sf.dml.put.k228b841c19bc","mark":"settled accept","obligations":["sf.dml.put.o110"],"sql_sha256":"228b841c19bce091646266823723e0478c47d100b8d166c8558a6eaae3ea1329"}
{"case_id":"sf.dml.put.k3e09455c9bfe","mark":"settled accept","obligations":["sf.dml.put.o091"],"sql_sha256":"3e09455c9bfe2a0d58e9a43b7230fc412951eb52b97732a727fadd430022bff4"}
{"case_id":"sf.dml.put.k48afca7c214a","mark":"settled reject","obligations":["sf.dml.put.o115"],"sql_sha256":"48afca7c214a689073bae07036881dd7f32c2e0024d1c0045159f4c4f667dcbb"}
{"case_id":"sf.dml.put.k645ecc8f5b83","mark":"settled accept","obligations":["sf.dml.put.o100"],"sql_sha256":"645ecc8f5b83e6843fc288f84ec72edeb0a3aedbd4aa75ab83124c60d64538d2"}
{"case_id":"sf.dml.put.k70bbb70a0c4c","mark":"settled reject","obligations":["sf.dml.put.o116"],"sql_sha256":"70bbb70a0c4c365d48bf4ae32fd1d3f852449cf5d614d63e1dc998fdec0cdf24"}
Expand Down
6 changes: 6 additions & 0 deletions coverage/syntax/marks/query.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
{"case_id":"sf.query.group-by.groupitem.k46c6aef98bda","mark":"settled accept","obligations":["sf.query.group-by.groupitem.o038"],"sql_sha256":"46c6aef98bda6721af2a408e463e3c3be02f4bfae0259efcae8b1d65317e94dc"}
{"case_id":"sf.query.group-by.groupitem.k55c471a5a685","mark":"settled accept","obligations":["sf.query.group-by.groupitem.o039"],"sql_sha256":"55c471a5a685ab88b8620098ba736d23df6ee94e299e46508ada3894683fb264"}
{"case_id":"sf.query.group-by.groupitem.kdc64a2152f24","mark":"settled accept","obligations":["sf.query.group-by.groupitem.o040"],"sql_sha256":"dc64a2152f249baa95554740947712cda8a7e1992d6273f04c30f75bff755460"}
{"case_id":"sf.query.join.join-2.k9f2b3b608fa1","mark":"settled accept","obligations":["sf.query.join.join-2.o024"],"sql_sha256":"9f2b3b608fa1ad7c3079dc9dc1de1431fb65297e5486f312e64e52803b76e968"}
{"case_id":"sf.query.join.join.k8b1a72dc88a7","mark":"settled accept","obligations":["sf.query.join.join.o035"],"sql_sha256":"8b1a72dc88a7a9bed7a67b9a6ce56e9987655df171049179ee37e4f434e5a28d"}
{"case_id":"sf.query.join.join.syntax.k688bab5ba02c","mark":"settled accept","obligations":["sf.query.join.join.syntax.o051"],"sql_sha256":"688bab5ba02c35a8964c251225b604e0becd79bc0677fbb0cc2a970ded910011"}
{"case_id":"sf.query.join.join.syntax.k90bad46f888f","mark":"settled reject","obligations":["sf.query.join.join.syntax.o049"],"sql_sha256":"90bad46f888f5c420a68b599a6a6232d087c253a22e9bba2e6505836a608e1d7"}
{"case_id":"sf.query.join.join.syntax.kd4dcf1d4745f","mark":"settled accept","obligations":["sf.query.join.join.syntax.o048"],"sql_sha256":"d4dcf1d4745f26cc79ef281cc2818f98ba16ad974c773d17451a9e2efe065dcc"}
{"case_id":"sf.query.join.join.syntax.kf0a651fb33d6","mark":"settled accept","obligations":["sf.query.join.join.syntax.o050"],"sql_sha256":"f0a651fb33d62481935751d6ffb65c43ee45aae2195a94081c6bd37208f26da2"}
{"case_id":"sf.query.match-recognize.match-recognize-pattern-define-as.k8a7c1367e4f3","mark":"settled accept","obligations":["sf.query.match-recognize.match-recognize-pattern-define-as.o102"],"sql_sha256":"8a7c1367e4f30819dfa68c83302bdd653bd86b47c0b90fb69383c4b3df0b01e3"}
{"case_id":"sf.query.order-by.orderitem.k4c08160a42e2","mark":"settled accept","obligations":["sf.query.order-by.orderitem.o033"],"sql_sha256":"4c08160a42e2e3f2d7c0a5e73c4c3cd4fbdcad88d405a2a5d2e4162ffa743578"}
{"case_id":"sf.query.order-by.orderitem.kbada27a706e3","mark":"settled accept","obligations":["sf.query.order-by.orderitem.o034"],"sql_sha256":"bada27a706e3468b8eba7dcc0adb9171ab7a0f2f61db5713c1225627c9ae635b"}
Expand Down
Loading
Loading