This is indeed a problem. Acutally, Doris currently not support decimal(20, 0).
The rule is:
(precision - scale) should >= (27 - 9). That is, the max length of integer part 
is 18.
So the following decimal is acceptable:
decimal(18, 0)
decimal(20, 2)
decimal(27, 9)


This is not a good design, we are working on refactoring decimal type. But if 
you still need to use decimal, you have
to follow to rule above.




--

此致!Best Regards
陈明雨 Mingyu Chen

Email:
chenmin...@apache.org





At 2022-04-15 21:07:33, "ziji" <zhangweilai...@163.com> wrote:
>Hi, I have a column named F_B718ADEC73E04CE3EC720DD11A06A308. The data type is 
>DECIMAL(20). But when I insert ‘1152204005154225920’ value( the length is 19) 
>into the column, occur error 'Reason: decimal value is not valid for 
>definition, column=F_B718ADEC73E04CE3EC720DD11A06A308, 
>value=1152204005154225920, precision=20, scale=0. src line: [];’. Please help 
>me! Thank you!
>
>
>The doris version is 0.15.0-rc4.
>
>
>

Reply via email to