LucaCappelletti94 opened a new pull request, #2671: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2671
In MsSql one `DECLARE` keyword takes a comma-separated list of declarations, `DECLARE @a INT, @b INT` (https://learn.microsoft.com/en-us/sql/t-sql/language-elements/declare-local-variable-transact-sql). The parser collected the list into one `Statement::Declare`, but the display joined it with `; `, so the statement was printed back as `DECLARE @a INT; @b INT`, which T-SQL reads as a different statement. `Statement::Declare` gains a `separator: DeclareSeparator` field. The MsSql parser records `Comma`, and the Snowflake, BigQuery and cursor forms record `Semicolon`, matching Snowflake Scripting's `DECLARE` section where each declaration ends with `;` (https://docs.snowflake.com/en/sql-reference/snowflake-scripting/declare). -- 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]
