amaksimo opened a new pull request, #2302: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2302
## 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>)` **DSQL docs**: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-indexes.html ## 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 ## Test plan - [ ] All existing CREATE INDEX tests pass with the new field added - [ ] New `parse_create_index_async` test verifies parsing and round-tripping - [ ] `CREATE UNIQUE INDEX ASYNC` variant is tested - [ ] Concurrently test verifies `!r#async` (mutual exclusivity) - [ ] Full test suite (1379 tests) passes with zero warnings -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
