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 loaded from a file. Also, I was trying to simplify the example SQL to a minimum reproducible example, but my original scenario is this kind of code inside of a SP. For example: ```mssql create or alter procedure test() as begin declare @x bit = 1 if @x = 1 begin select 1 end end ``` This also demonstrates the difficulty. I will adjust my Rust logic to the approach you suggested and see if I can make it work -- thank you! I still view this as a very surprising library behavior, though, especially since SQL Server itself accepts/parses/executes the identical file without issue. -- 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...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org