Skip to content

fix(syntax-receipts): place replication not enabled for the account as semantic - #188

Merged
kvlonge merged 1 commit into
mainfrom
fix/import-replication-errno
Nov 12, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/import-replication-errno

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Why

The receipt importer refused every row with errno 3078 ("Replication is not enabled for your account", SQLSTATE 55000) as having no established phase. Snowflake raises it only after parsing, so 69 captured rows went unimported: 46 from the latest runs and 23 from earlier ones.

Changes

  • fix(syntax-receipts): errno 3078 is reviewed as semantic, like the other account restrictions.
  • The docs list it with the other reviewed errnos, and a classify test covers it.

Evidence that Snowflake parses first

In CREATE FAILOVER GROUP, CREATE REPLICATION GROUP and CREATE DATABASE ... AS REPLICA OF, every case Snowflake rejects as malformed returns errno 1003. That includes one-token near misses of statements that reach 3078, such as TAG ( 'v1' = 'm' ) against TAG ( v1 = 'm' ). All 62 errno 3078 rows are statements that parse. Some later checks (391805, 391803) also come before 3078.

Verification

  • Re-importing the existing runs, with nothing re-recorded, adds exactly 69 receipts, all errno 3078 as semantic_error. Every previously imported receipt is byte-identical.
  • uv run pytest tests/unit/scripts/syntax_receipts: 76 passed. The new test fails without the fix.
  • make check-ci RECORDER=0 passed on this head.

…s 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.
@kvlonge
kvlonge added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit e55255a Nov 12, 2026
13 checks passed
@kvlonge
kvlonge deleted the fix/import-replication-errno branch November 12, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant