[ 
https://issues.apache.org/jira/browse/HIVE-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13756943#comment-13756943
 ] 

Xuefu Zhang commented on HIVE-3976:
-----------------------------------

[~jdere] Thanks for posting your code regarding precision/scale, and your 
comments about related UDFs. There seems a lot of work, but we hope the outcome 
is worth the effort. It's good that you have gained insight with your 
char/varchar work. It will be valuable.

[~hagleitn] Thanks for sharing your thoughts. I agree that this is complex 
enough to have a spec, with which, the issue may  close quicker and easier due 
to a large community. The questions you posted are valid and yet to be 
answered. Existing decimal feature seems incomplete and non-standard in many 
ways. With this task, we can hope to put it in a good shape. In principal, I 
think we should follow standard if available, and follow some implementation or 
have hive's own implementation when standard is not defined. Doing that seems 
making it unavoidable to break backward compatibility. But how much we can 
break. For instance, can we say that a decimal without precision and scale 
specified defaults to (10, 0) (as mysql does) rather than the current (38, ?). 
It's great if we can redefine everything and do it right, once for all.
                
> Support specifying scale and precision with Hive decimal type
> -------------------------------------------------------------
>
>                 Key: HIVE-3976
>                 URL: https://issues.apache.org/jira/browse/HIVE-3976
>             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 table.
> 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: http://www.atlassian.com/software/jira

Reply via email to