hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-12063) Pad Decimal numbers with trailing zeros to the scale of the column
Date Wed, 07 Oct 2015 23:42:26 GMT

     [ https://issues.apache.org/jira/browse/HIVE-12063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xuefu Zhang updated HIVE-12063:
-------------------------------
    Description: 
HIVE-7373 was to address the problems of trimming tailing zeros by Hive, which caused many
problems including treating 0.0, 0.00 and so on as 0, which has different precision/scale.
Please refer to HIVE-7373 description. However, HIVE-7373 was reverted by HIVE-8745 while
the underlying problems remained. HIVE-11835 was resolved recently to address one of the problems,
where 0.0, 0.00, and so on cannot be read into decimal(1,1).

However, HIVE-11835 didn't address the problem of showing as 0 in query result for any decimal
values such as 0.0, 0.00, etc. This causes confusion as 0 and 0.0 have different precision/scale
than 0.

The proposal here is to pad zeros for query result to the type's scale. This not only removes
the confusion described above, but also aligns with many other DBs. Internal decimal number
representation doesn't change, however.

  was:
HIVE-7373 was to address the problem of trimming tailing zeros by Hive, which caused many
problems including treating 0.0, 0.00 and so on as 0, which has different precision/scale.
Please refer to HIVE-7373 description. However, HIVE-7373 was reverted by HIVE-8745 while
the underlying problems remained. HIVE-11835 was resolved recently to address one of the problems,
where 0.0, 0.00, and so cannot be read into decimal(1,1).

However, HIVE-11835 didn't address the problem of showing as 0 in query result for any decimal
values such as 0.0, 0.00, etc. This causes confusion as 0 and 0.0 have different precision/scale
than 0.

The proposal here is to pad zeros for query result to the type's scale. This not only removes
the confusion described above, but also aligns with many other DBs. Internal decimal number
representation doesn't change, however.


> Pad Decimal numbers with trailing zeros to the scale of the column
> ------------------------------------------------------------------
>
>                 Key: HIVE-12063
>                 URL: https://issues.apache.org/jira/browse/HIVE-12063
>             Project: Hive
>          Issue Type: Improvement
>          Components: Types
>    Affects Versions: 0.14.0, 1.0.0, 1.2.0, 1.1.0, 0.13
>            Reporter: Xuefu Zhang
>            Assignee: Xuefu Zhang
>
> HIVE-7373 was to address the problems of trimming tailing zeros by Hive, which caused
many problems including treating 0.0, 0.00 and so on as 0, which has different precision/scale.
Please refer to HIVE-7373 description. However, HIVE-7373 was reverted by HIVE-8745 while
the underlying problems remained. HIVE-11835 was resolved recently to address one of the problems,
where 0.0, 0.00, and so on cannot be read into decimal(1,1).
> However, HIVE-11835 didn't address the problem of showing as 0 in query result for any
decimal values such as 0.0, 0.00, etc. This causes confusion as 0 and 0.0 have different precision/scale
than 0.
> The proposal here is to pad zeros for query result to the type's scale. This not only
removes the confusion described above, but also aligns with many other DBs. Internal decimal
number representation doesn't change, however.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message