From 7967bfe2c69972ca43b126235836ecba899bd6ea Mon Sep 17 00:00:00 2001 From: Kevin Longe <273747162+kvlonge@users.noreply.github.com> Date: Thu, 12 Nov 2026 01:01:38 +0000 Subject: [PATCH] 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. --- docs/syntax-coverage.md | 7 ++++--- scripts/syntax_receipts/constants.py | 1 + tests/unit/scripts/syntax_receipts/test_import_runs.py | 10 ++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/syntax-coverage.md b/docs/syntax-coverage.md index 8ccbf10ca..3e3f78458 100644 --- a/docs/syntax-coverage.md +++ b/docs/syntax-coverage.md @@ -180,9 +180,10 @@ that edits or removes a committed one. A reviewed errno is one whose message shows that Snowflake parsed the statement and then refused it. Examples are a duplicate secret name (509008), a missing object to undrop (90025), - access control (3001), a required property (3172), an account restriction (93171) and an - application-only operation (98620). Internal errors (603), statement timeouts (630) and errors - that may come from the parser itself stay refused. + access control (3001), a required property (3172), an account restriction (93171), replication + that is not enabled for the account (3078) and an application-only operation (98620). Internal + errors (603), statement timeouts (630) and errors that may come from the parser itself stay + refused. - `raw_record_sha256`, `run_audit_sha256` and `packet_sha256`: the hashes of the private raw record, the private run audit and the submitted packet. - Optional provenance: `case_hash`, `input_sha256`, `statement_index`, `statements_in_input`, diff --git a/scripts/syntax_receipts/constants.py b/scripts/syntax_receipts/constants.py index acec7c399..532584a10 100644 --- a/scripts/syntax_receipts/constants.py +++ b/scripts/syntax_receipts/constants.py @@ -16,6 +16,7 @@ REVIEWED_SEMANTIC_ERRNOS: frozenset[int] = frozenset( { 3001, + 3078, 3172, 90025, 93171, diff --git a/tests/unit/scripts/syntax_receipts/test_import_runs.py b/tests/unit/scripts/syntax_receipts/test_import_runs.py index 1e9da3dfa..699475472 100644 --- a/tests/unit/scripts/syntax_receipts/test_import_runs.py +++ b/tests/unit/scripts/syntax_receipts/test_import_runs.py @@ -177,6 +177,16 @@ message="Statement reached its statement or warehouse timeout of 30 second(s).", expected_classification=None, ), + ClassifyTestCase( + description="replication not enabled for the account is semantic", + errno=3078, + sqlstate="55000", + message="Replication is not enabled for your account.", + expected_classification=( + "semantic_error", + "errno 3078 SQLSTATE 55000, reviewed as semantic", + ), + ), ClassifyTestCase( description="an unreviewed errno without the compilation prefix is not established", errno=926,