Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-10 Thread via GitHub
aharpervc commented on PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#issuecomment-2784381755 > If your example statement for the stored procedure does not parse, I would suggest to open an issue as a starting point. Done: https://github.com/apache/datafus

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-07 Thread via GitHub
romanb commented on PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#issuecomment-2784202219 @aharpervc I see your difficulty. While working on this PR I did notice that a more general custom parsing for begin/end for the MSSQL dialect is probably necessary as we

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-07 Thread via GitHub
aharpervc commented on PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#issuecomment-2784031574 Interesting. Of course, I should have also shared my Rust code. I'm doing `Parser::parse_sql(&dialect, sql_text)` where the dialect is SQL Server & the sql_text is load

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-07 Thread via GitHub
romanb commented on PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#issuecomment-2783825394 > This is a great improvement! However, I noticed a difficulty with my code. This SQL fails to parse: > > ``` > declare @x bit = 1 > > if @x = 1 > begin

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-07 Thread via GitHub
aharpervc commented on PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#issuecomment-2783695881 This is a great improvement! However, I noticed a difficulty with my code. This SQL fails to parse: ``` declare @x bit = 1 if @x = 1 begin se

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-07 Thread via GitHub
alamb commented on PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#issuecomment-2783255779 Amazing -- thank you @romanb and @iffyio -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL a

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-05 Thread via GitHub
iffyio merged PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791 -- 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: github-unsubscr

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-05 Thread via GitHub
romanb commented on code in PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#discussion_r2029938472 ## src/ast/spans.rs: ## @@ -739,19 +740,12 @@ impl Spanned for CreateIndex { impl Spanned for CaseStatement { fn span(&self) -> Span { le

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-04 Thread via GitHub
iffyio commented on code in PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#discussion_r2029718008 ## src/ast/spans.rs: ## @@ -739,19 +740,12 @@ impl Spanned for CreateIndex { impl Spanned for CaseStatement { fn span(&self) -> Span { le

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-04 Thread via GitHub
iffyio commented on code in PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#discussion_r2025392312 ## src/ast/mod.rs: ## @@ -2145,116 +2149,189 @@ impl fmt::Display for CaseStatement { } if let Some(else_block) = else_block { -

Re: [PR] Add support for MSSQL IF/ELSE statements. [datafusion-sqlparser-rs]

2025-04-04 Thread via GitHub
romanb commented on code in PR #1791: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1791#discussion_r2029344741 ## src/ast/mod.rs: ## @@ -2145,116 +2149,189 @@ impl fmt::Display for CaseStatement { } if let Some(else_block) = else_block { -