Skip to content
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

support int1,int2,int3,int4,int8 aliases #287

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6084,6 +6084,21 @@ func TestCreateTable(t *testing.T) {
"PARTITION BY LINEAR HASH (a)" +
"PARTITIONS 10 SUBPARTITION BY LINEAR HASH (b) SUBPARTITIONS 20 ",
},
{
input: "create table t (\n" +
"\ti1 int1,\n" +
"\ti2 int2,\n" +
"\ti3 int3,\n" +
"\ti4 int4,\n" +
"\ti8 int8)",
output: "create table t (\n" +
"\ti1 TINYINT,\n" +
"\ti2 SMALLINT,\n" +
"\ti3 MEDIUMINT,\n" +
"\ti4 INT,\n" +
"\ti8 BIGINT\n" +

Choose a reason for hiding this comment

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

seems like [an int type)([1-4]) is also valid

")",
},
}
for _, tcase := range testCases {
t.Run(tcase.input, func(t *testing.T) {
Expand Down
Loading