Skip to content

Add ASYNC keyword support for CREATE INDEX#2302

Open
amaksimo wants to merge 4 commits intoapache:mainfrom
amaksimo:dsql-async-index
Open

Add ASYNC keyword support for CREATE INDEX#2302
amaksimo wants to merge 4 commits 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
Comment thread tests/sqlparser_postgres.rs Outdated
Comment thread src/ast/ddl.rs
amaksimo and others added 3 commits April 29, 2026 10:51
Co-authored-by: Ifeanyi Ubah <ify1992@yahoo.com>
- Add DSQL docs link to the async field
- Simplify async index tests to round-trip verified_stmt calls
- Move async index tests from sqlparser_postgres.rs to sqlparser_common.rs
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