LucaCappelletti94 opened a new pull request, #2739: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2739
`CREATE TABLE t (id INT, PRIMARY KEY USING BTREE (id))` failed with `Expected: a list of columns in parentheses, found: BTREE`, and so did `UNIQUE USING BTREE (id)` and `UNIQUE KEY USING BTREE (id)`. MySQL allows the index type before the key parts without an index name (https://dev.mysql.com/doc/refman/8.4/en/create-table.html), but the `PRIMARY` and `UNIQUE` arms of `parse_optional_table_constraint` took `USING` as the index name. The `INDEX`/`KEY` arm already skipped the name when the next word is `USING`. That check now sits in one private helper that all three arms call. -- 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]
