Skip to content

Add semicolon to the end of the ALTER SQL, test will panic #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
miuy56dc opened this issue Jul 21, 2020 · 1 comment
Closed

Add semicolon to the end of the ALTER SQL, test will panic #233

miuy56dc opened this issue Jul 21, 2020 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@miuy56dc
Copy link
Contributor

miuy56dc commented Jul 21, 2020

I change the test in sqlparser_common.rs https://github.com/ballista-compute/sqlparser-rs/blob/f053383c718b3d4942751224783c594ff7e9f0b1/tests/sqlparser_common.rs#L1380
change "ALTER TABLE tab ADD COLUMN foo TEXT" to "ALTER TABLE tab ADD COLUMN foo TEXT;", add a semicolon at the end of the SQL, when I rerun the test it reports

---- parse_alter_table stdout ----
thread 'parse_alter_table' panicked at 'called `Result::unwrap()` on an `Err` value: ParserError("Expected column option, found: ;")', src/test_utils.rs:70:30
@nickolay
Copy link
Contributor

Yeah, seems like in #203 we should have made the match in parse_column_def context-dependent...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants