mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-15 00:09:02 +00:00
Don't fail parsing ALTER TABLE ADD COLUMN ending with a semicolon (#246)
This is a follow-up to https://github.com/ballista-compute/sqlparser-rs/pull/203 where ALTER TABLE ADD COLUMN support was initially implemented. Fixes #233.
This commit is contained in:
parent
f8feff4ef2
commit
9c1a5a781d
2 changed files with 3 additions and 3 deletions
|
@ -1459,8 +1459,8 @@ fn parse_create_external_table_lowercase() {
|
|||
|
||||
#[test]
|
||||
fn parse_alter_table() {
|
||||
let add_column = "ALTER TABLE tab ADD COLUMN foo TEXT";
|
||||
match verified_stmt(add_column) {
|
||||
let add_column = "ALTER TABLE tab ADD COLUMN foo TEXT;";
|
||||
match one_statement_parses_to(add_column, "ALTER TABLE tab ADD COLUMN foo TEXT") {
|
||||
Statement::AlterTable {
|
||||
name,
|
||||
operation: AlterTableOperation::AddColumn { column_def },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue