hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <>
Subject [jira] [Commented] (HIVE-3976) Support specifying scale and precision with Hive decimal type
Date Wed, 11 Sep 2013 19:14:52 GMT


Xuefu Zhang commented on HIVE-3976:

Thanks for sharing the thoughts. I think both 1) and 2) are regarding to backward compatibility.
If decimal is reserved for fixed precision/scale, then there is no way to be fully backward
compatible. That's because decimal, as it's in hive, is fixed precision and variable scale.
No matter what the new default is for scale, there will be compatibility issue. To make things
worse, user doesn't even know the scale of the existing data.

As mentioned, if the adoption is low, it might make better sense for us to take the pain and
do it right. This is the stand point that the document takes. Validity of the assumption is
subject to discussion, of course.

As to non-generic UDFs, I think we need to educate user to avoid them unless the whatever
the default is exactly what he/she needs, which is unlikely in my opinion: if they needs decimal(5,
2), decimal(6,3) will not make them happier.
> Support specifying scale and precision with Hive decimal type
> -------------------------------------------------------------
>                 Key: HIVE-3976
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor, Types
>            Reporter: Mark Grover
>            Assignee: Xuefu Zhang
>         Attachments: remove_prec_scale.diff
> HIVE-2693 introduced support for Decimal datatype in Hive. However, the current implementation
has unlimited precision and provides no way to specify precision and scale when creating the
> For example, MySQL allows users to specify scale and precision of the decimal datatype
when creating the table:
> {code}
> CREATE TABLE numbers (a DECIMAL(20,2));
> {code}
> Hive should support something similar too.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message