Skip to content

Commit 248bf3a

Browse files
authored
mysql: ignore zerofill on type (#3342)
this is a display hint
1 parent c4890a1 commit 248bf3a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

flow/e2e/clickhouse/mysql_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ func (s ClickHouseSuite) Test_UnsignedMySQL() {
2727
id serial primary key,
2828
i8 tinyint, u8 tinyint unsigned,
2929
i16 smallint, u16 smallint unsigned,
30-
i24 mediumint, u24 mediumint unsigned,
31-
i32 int, u32 int unsigned,
30+
i24 mediumint zerofill, u24 mediumint unsigned,
31+
i32 int, u32 int unsigned zerofill,
3232
i64 bigint, u64 bigint unsigned,
3333
d decimal(7, 6), b boolean
3434
)`, srcFullName)))

flow/shared/mysql/type_conversion.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
)
99

1010
func QkindFromMysqlColumnType(ct string) (types.QValueKind, error) {
11+
ct, _ = strings.CutSuffix(ct, " zerofill")
1112
ct, isUnsigned := strings.CutSuffix(ct, " unsigned")
1213
ct, param, _ := strings.Cut(ct, "(")
1314
switch strings.ToLower(ct) {

0 commit comments

Comments
 (0)