xgbtxy opened a new pull request, #3052: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/3052
Fixes `Display` for `IndexConstraint` when multiple MySQL `index_options` are present. Broken example: ```sql CREATE TABLE t (a INT, b INT, INDEX idx (a, b) USING BTREE COMMENT 'lookup') ``` Previously displayed as: ```sql CREATE TABLE t (a INT, b INT, INDEX idx (a, b) USING BTREE, COMMENT 'lookup') ``` which inserts a stray comma between index options and fails to reparse. Fix: - Use `display_separated(&self.index_options, " ")` in `IndexConstraint::fmt` (`src/ast/table_constraints.rs`), matching `PrimaryKeyConstraint`, `UniqueConstraint`, and `CreateIndex`. - Add positive and negative unit tests in `tests/sqlparser_mysql.rs` and a minimal fuzz seed in `fuzz/fuzz_seeds/mysql_index_constraint_options.sql`. Disclosure: AI assistance was used to help locate the bug, draft the fix, and write the tests; all changes and checks were verified locally. -- 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]
