colinhacks opened a new pull request, #2991: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2991
Dialects: MsSql With `require_semicolon_stmt_delimiter = false`, `SELECT 1` followed by `SET @x = 1` on the next line failed with `Expected: an SQL statement, found: @x`, because `SET` was read as an implicit alias of `1`. `BEGIN`, `OPEN`, `CLOSE`, `DEALLOCATE`, `GRANT`, `DENY`, `WAITFOR` and `KILL` failed the same way after a select item, most of them after a table name too, and `COMMIT`, `ROLLBACK` and `REVOKE` were misread with no error: `SELECT a FROM t` followed by `COMMIT` came back as one statement, `SELECT a FROM t COMMIT`. All of these are reserved keywords in T-SQL (https://learn.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql), so they join the statement keywords MsSql already keeps out of aliases. `USE` is reserved too but stays out, since `parse_select_table_with_index_hints` expects `SELECT * FROM T USE LIMIT 1` to read it as an alias in every dialect without table hints. Written with an AI coding assistant. -- 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]
