Skip to content

Commit 61edbdc

Browse files
committed
fix yacc error for collate clause
1 parent 0cbedf5 commit 61edbdc

File tree

3 files changed

+830
-823
lines changed

3 files changed

+830
-823
lines changed

parser_test.go

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
)
88

9-
func TestParseAlterTableAddColumn(t *testing.T) {
9+
func TestParseAlterTable(t *testing.T) {
1010
querys := []string{
1111
`
1212
alter table db1.table1 add (id number)
@@ -57,7 +57,10 @@ alter table db1.table1 add (id varchar2(255) default "test")
5757
alter table db1.table1 add (id number default 123)
5858
`,
5959
`
60-
alter table db1.table1 modify (id number default 123)
60+
alter table db1.table1 modify (id varchar2(255))
61+
`,
62+
`
63+
alter table db1.table1 modify (id varchar2(255) default "123")
6164
`,
6265
`
6366
alter table db1.table1 drop column id
@@ -82,7 +85,10 @@ alter table db1.table1 rename column id to new_id
8285
func TestParseCreateTableStmt(t *testing.T) {
8386
querys := []string{
8487
`
85-
crate table db1.table1 (id number, name varchar2(255))
88+
create table db1.table1 (id number(10));
89+
`,
90+
`
91+
create table db1.table1 (id number(10), name varchar2(255));
8692
`,
8793
}
8894
for _, query := range querys {

0 commit comments

Comments
 (0)