Skip to content

Conversation

wugeer
Copy link
Contributor

@wugeer wugeer commented Nov 1, 2024

This PR resolves an error in MSSQL that occurs when parsing multiple SQL statements containing DECLARE statements.

before
parse sql in mssql

declare @a int;
set @a = 2;
select @a * 4;

raise error

Error during parsing: ParserError("Expected: end of statement, found: set at Line: 2, Column: 1")

This resolves issue #1450

@wugeer wugeer changed the title Fix the parsing error in MSSQL for multiple statements that include `… Fix the parsing error in MSSQL for multiple statements that include DECLARE statements Nov 4, 2024
@wugeer wugeer requested a review from iffyio November 6, 2024 23:10
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @wugeer!
cc @alamb

@iffyio
Copy link
Contributor

iffyio commented Nov 9, 2024

@wugeer in the meantime when you get the chance could you take a look at the compile issue? i think it likely just needs the latest changes from main incorporated

…DECLARE` statements.

before
parse sql in mssql
```
declare @A int;
set @A = 2;
select @A * 4;
```
raise error
```
Error during parsing: ParserError("Expected: end of statement, found: set at Line: 2, Column: 1")
```
@wugeer
Copy link
Contributor Author

wugeer commented Nov 9, 2024

@iffyio Thank you for your guidance. I have already fixed it. :)

@alamb alamb merged commit 632ba4c into apache:main Nov 13, 2024
8 checks passed
@alamb
Copy link
Contributor

alamb commented Nov 13, 2024

Thanks again @wugeer and @iffyio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants