Skip to content

Accept CREATE OR REPLACE SCHEMA#2396

Open
sabir-akhadov-localstack wants to merge 1 commit into
apache:mainfrom
localstack:pr/04-create-or-replace-schema
Open

Accept CREATE OR REPLACE SCHEMA#2396
sabir-akhadov-localstack wants to merge 1 commit into
apache:mainfrom
localstack:pr/04-create-or-replace-schema

Conversation

@sabir-akhadov-localstack

@sabir-akhadov-localstack sabir-akhadov-localstack commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

CREATE OR REPLACE SCHEMA did not parse. CREATE SCHEMA was handled after the OR REPLACE allowlist bail-out in parse_create, so any OR REPLACE in front of it produced an error:

CREATE OR REPLACE SCHEMA foo
CREATE OR REPLACE SCHEMA IF NOT EXISTS foo

This routes the SCHEMA keyword ahead of that bail-out and adds an or_replace: bool field to Statement::CreateSchema. Display round-trips OR REPLACE.

@sabir-akhadov-localstack sabir-akhadov-localstack force-pushed the pr/04-create-or-replace-schema branch from d5e66f5 to 782f668 Compare July 2, 2026 13:17
Add an `or_replace: bool` field to `Statement::CreateSchema` and route the
SCHEMA keyword ahead of the `or_replace` allowlist bail-out in
`Parser::parse_create` so that `CREATE OR REPLACE SCHEMA [IF NOT EXISTS] foo`
parses successfully. Display round-trips OR REPLACE.
@sabir-akhadov-localstack sabir-akhadov-localstack force-pushed the pr/04-create-or-replace-schema branch from 782f668 to a772d1d Compare July 2, 2026 13:19
@sabir-akhadov-localstack sabir-akhadov-localstack marked this pull request as ready for review July 2, 2026 13:20
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.

2 participants