Skip to content

Commit 7967bfe

Browse files
committed
fix(syntax-receipts): place replication not enabled for the account as semantic
Errno 3078 (SQLSTATE 55000, "Replication is not enabled for your account") was refused as having no established phase. Snowflake parses the statement before this check: in CREATE FAILOVER GROUP, CREATE REPLICATION GROUP and CREATE DATABASE ... AS REPLICA OF, every case Snowflake rejects as malformed returns errno 1003, including one-token near misses of statements that reach errno 3078, and only statements that parse reach errno 3078. The errno is now reviewed as semantic, like the other account restrictions.
1 parent 6036370 commit 7967bfe

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

‎docs/syntax-coverage.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,10 @@ that edits or removes a committed one.
180180

181181
A reviewed errno is one whose message shows that Snowflake parsed the statement and then
182182
refused it. Examples are a duplicate secret name (509008), a missing object to undrop (90025),
183-
access control (3001), a required property (3172), an account restriction (93171) and an
184-
application-only operation (98620). Internal errors (603), statement timeouts (630) and errors
185-
that may come from the parser itself stay refused.
183+
access control (3001), a required property (3172), an account restriction (93171), replication
184+
that is not enabled for the account (3078) and an application-only operation (98620). Internal
185+
errors (603), statement timeouts (630) and errors that may come from the parser itself stay
186+
refused.
186187
- `raw_record_sha256`, `run_audit_sha256` and `packet_sha256`: the hashes of the private raw
187188
record, the private run audit and the submitted packet.
188189
- Optional provenance: `case_hash`, `input_sha256`, `statement_index`, `statements_in_input`,

‎scripts/syntax_receipts/constants.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
REVIEWED_SEMANTIC_ERRNOS: frozenset[int] = frozenset(
1717
{
1818
3001,
19+
3078,
1920
3172,
2021
90025,
2122
93171,

‎tests/unit/scripts/syntax_receipts/test_import_runs.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,16 @@
177177
message="Statement reached its statement or warehouse timeout of 30 second(s).",
178178
expected_classification=None,
179179
),
180+
ClassifyTestCase(
181+
description="replication not enabled for the account is semantic",
182+
errno=3078,
183+
sqlstate="55000",
184+
message="Replication is not enabled for your account.",
185+
expected_classification=(
186+
"semantic_error",
187+
"errno 3078 SQLSTATE 55000, reviewed as semantic",
188+
),
189+
),
180190
ClassifyTestCase(
181191
description="an unreviewed errno without the compilation prefix is not established",
182192
errno=926,

0 commit comments

Comments
 (0)