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

mysql->doris BIGINT(20) UNSIGNED 类型映射 失败 #175

Closed
baisui1981 opened this issue Dec 15, 2022 · 2 comments
Closed

mysql->doris BIGINT(20) UNSIGNED 类型映射 失败 #175

baisui1981 opened this issue Dec 15, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@baisui1981
Copy link
Member

MySQL 中创建如下表,全量到入doris时loadstream出错

CREATE TABLE `ttt` (
  `id` BIGINT(20) UNSIGNED NOT NULL,
  `member_id` BIGINT(20) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
@baisui1981 baisui1981 added bug Something isn't working 3.7.0 labels Dec 15, 2022
@baisui1981
Copy link
Member Author

复现该错误:

准备一个json 提交文本:

[{"id":"18446744073709551615"
   ,"member_id":"2"}]

提交数据到Doris 服务端:

  curl -XPUT   -T ~/Downloads/data.json -H "strip_outer_array:true" -H "format:json" -H "Authorization:Basic cm9vdDo=" http://192.168.28.201:8040/api/tis/ttt/_stream_load

得到如下反馈:

 Reason: decimal value is not valid for definition, column=id, value=-1, precision=20, scale=0; . src line []; 

@baisui1981
Copy link
Member Author

原因本质是 doris中没有 mysql BIGINT(20) UNSIGNED 所对应的数据类型,转成 decimal(20,0) 类型之后,doris中又不能让deciaml 成为primary Key,所以目前处理办法只能让 转成对应的doris中的BIGINT类型,但愿用户在实际使用时不会使用太大的整型值

@baisui1981 baisui1981 added this to the v3.7.1 milestone Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant