Repository navigation
fix(syntax-receipts): place replication not enabled for the account as semantic - #188
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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' )againstTAG ( v1 = 'm' ). All 62 errno 3078 rows are statements that parse. Some later checks (391805, 391803) also come before 3078.Verification
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=0passed on this head.