Add ASYNC keyword support for CREATE INDEX#2302
Open
amaksimo wants to merge 1 commit intoapache:mainfrom
Open
Conversation
5 tasks
Amazon Aurora DSQL uses `CREATE INDEX ASYNC` to create indexes asynchronously. This adds parsing support for the ASYNC keyword in CREATE INDEX statements. Changes: - Add ASYNC keyword to the keyword list - Add `async` field to CreateIndex struct - Parse ASYNC keyword after CONCURRENTLY in parse_create_index - Round-trip support via Display impl - Tests for CREATE INDEX ASYNC and CREATE UNIQUE INDEX ASYNC
9f4bb86 to
3d2a225
Compare
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.
Summary
Amazon Aurora DSQL uses
CREATE INDEX ASYNCto create indexes asynchronously. This adds parsing support for theASYNCkeyword inCREATE INDEXstatements, following the same pattern as the existingCONCURRENTLYkeyword.Syntax:
CREATE [UNIQUE] INDEX [ASYNC] [IF NOT EXISTS] <name> ON <table>(<columns>)Changes
ASYNCto the keyword list (keywords.rs)pub r#async: boolfield toCreateIndexstruct (ast/ddl.rs)ASYNCkeyword afterCONCURRENTLYinparse_create_index(parser/mod.rs)DisplayimplSpannedimpl (ast/spans.rs)CREATE INDEX ASYNCandCREATE UNIQUE INDEX ASYNC(sqlparser_postgres.rs)CreateIndextest patterns with the new fieldThanks for revewing!