[
https://issues.apache.org/jira/browse/HIVE-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13552297#comment-13552297
]
Gunther Hagleitner commented on HIVE-2693:
------------------------------------------
Mark: Scale is different from the return type. Seems both you and Namit are
open to using decimal as the return type with documentation. Given that decimal
avoids overflow issues, I think we can settle on the current (patch .21)
implementation for this.
As far as the scale/representation of the returned decimal goes: I don't see a
bug. 0.00, 0, 0E-99 are all the same number it's just the representation that's
different. And since all these numbers are considered the same they will be
handled correctly by the system (we don't consider identical numbers with
different scale different). Keeping representation in line with MySQL has other
implications. For one, MySQL doesn't use scientific notation, also MySQL
decimals are defined with additional parameters prec and scale, which control
among other things the representation.
My proposal: Keep patch HIVE-2693-21.patch as is and check it in. It passed
muster with Ashutosh, Carl and Namit and gives correct results in Mark's cases
as well. Open a new jira to extend the feature and give users control over
representation with optional prec/scale (i.e.: decimal(5,2)).
> Add DECIMAL data type
> ---------------------
>
> Key: HIVE-2693
> URL: https://issues.apache.org/jira/browse/HIVE-2693
> Project: Hive
> Issue Type: New Feature
> Components: Query Processor, Types
> Affects Versions: 0.10.0
> Reporter: Carl Steinbach
> Assignee: Prasad Mujumdar
> Attachments: 2693_7.patch, 2693_8.patch, 2693_fix_all_tests1.patch,
> HIVE-2693-10.patch, HIVE-2693-11.patch, HIVE-2693-12-SortableSerDe.patch,
> HIVE-2693-13.patch, HIVE-2693-14.patch, HIVE-2693-15.patch,
> HIVE-2693-16.patch, HIVE-2693-17.patch, HIVE-2693-18.patch,
> HIVE-2693-19.patch, HIVE-2693-1.patch.txt, HIVE-2693-20.patch,
> HIVE-2693-21.patch, HIVE-2693-22.patch, HIVE-2693-all.patch,
> HIVE-2693.D7683.1.patch, HIVE-2693-fix.patch, HIVE-2693.patch,
> HIVE-2693-take3.patch, HIVE-2693-take4.patch
>
>
> Add support for the DECIMAL data type. HIVE-2272 (TIMESTAMP) provides a nice
> template for how to do this.
--
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