Skip to content

Add ASYNC keyword support for CREATE INDEX#2302

Open
amaksimo wants to merge 1 commit intoapache:mainfrom
amaksimo:dsql-async-index
Open

Add ASYNC keyword support for CREATE INDEX#2302
amaksimo wants to merge 1 commit intoapache:mainfrom
amaksimo:dsql-async-index

Conversation

@amaksimo
Copy link
Copy Markdown

@amaksimo amaksimo commented Apr 14, 2026

Summary

Amazon Aurora DSQL uses CREATE INDEX ASYNC to create indexes asynchronously. This adds parsing support for the ASYNC keyword in CREATE INDEX statements, following the same pattern as the existing CONCURRENTLY keyword.

Syntax: CREATE [UNIQUE] INDEX [ASYNC] [IF NOT EXISTS] <name> ON <table>(<columns>)

Changes

  • Add ASYNC to the keyword list (keywords.rs)
  • Add pub r#async: bool field to CreateIndex struct (ast/ddl.rs)
  • Parse ASYNC keyword after CONCURRENTLY in parse_create_index (parser/mod.rs)
  • Round-trip support via Display impl
  • Update Spanned impl (ast/spans.rs)
  • Tests for CREATE INDEX ASYNC and CREATE UNIQUE INDEX ASYNC (sqlparser_postgres.rs)
  • Update all existing CreateIndex test patterns with the new field

Thanks for revewing!

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
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