Skip to content

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

Description

@miuy56dc

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

Activity

  1. nickolay commented on Jul 27, 2020

    @nickolay
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions