[
https://issues.apache.org/jira/browse/HIVE-8559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14180129#comment-14180129
]
Xuefu Zhang commented on HIVE-8559:
-----------------------------------
Can you also try MySQL? decimal(6,6) can store a data range of 0.000000 to
0.999999 (-/+). 0 has a precision/scale (1,0). Looks like 0 is a special case,
and maybe 0 should be cast to .000000.
> DECIMAL field can not store 0 if precision = scale
> --------------------------------------------------
>
> Key: HIVE-8559
> URL: https://issues.apache.org/jira/browse/HIVE-8559
> Project: Hive
> Issue Type: Bug
> Affects Versions: 0.13.1
> Reporter: Alexander Pivovarov
>
> For example the following query returns NULL instead of 0 in hive (trunk )
> select cast(0 as decimal(6,6));
> OK
> NULL
> I tried DECIMAL(6,6) in oracle. It can store 0.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)