LucaCappelletti94 opened a new pull request, #2663: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2663
`CREATE INDEX ii ON t(c ops DESC)` was displayed as `CREATE INDEX ii ON t(c DESC ops)`, putting the operator class after the sort options, which no longer parses as the same index column. PostgreSQL's `CREATE INDEX` synopsis puts the operator class first, followed by `ASC`/`DESC` and `NULLS` (https://www.postgresql.org/docs/current/sql-createindex.html). The sort modifiers of `OrderByExpr` (`ASC`/`DESC`, `NULLS`, `WITH FILL`) are now written by a shared helper, and `IndexColumn` prints the column expression, then the operator class, then those modifiers. The parser reads operator classes in every dialect, so the test round-trips `CREATE INDEX` columns with and without an operator class and sort options in all of them, and checks the parsed operator class and sort order. -- 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]
