You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jason Dere (JIRA)" <ji...@apache.org> on 2017/06/28 21:33:00 UTC

[jira] [Commented] (HIVE-10616) TypeInfoUtils doesn't handle DECIMAL with just precision specified

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

Jason Dere commented on HIVE-10616:
-----------------------------------

A bit late to the dance here, but the behavior here is definitely odd, should be either
1) correctly parse decimal(precision)
2) raise an error because decimal(precision, scale) is required
Returning decimal(10,0) in this case is just wrong - if we do make a change, might as well use [~tfriedr]'s patch. Do you mind adding a testcase to TestTypeInfoUtils for this?

> TypeInfoUtils doesn't handle DECIMAL with just precision specified
> ------------------------------------------------------------------
>
>                 Key: HIVE-10616
>                 URL: https://issues.apache.org/jira/browse/HIVE-10616
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>    Affects Versions: 1.0.0
>            Reporter: Thomas Friedrich
>            Assignee: Thomas Friedrich
>            Priority: Minor
>         Attachments: HIVE-10616.1.patch
>
>
> The parseType method in TypeInfoUtils doesn't handle decimal types with just precision specified although that's a valid type definition. 
> As a result, TypeInfoUtils.getTypeInfoFromTypeString will always return decimal(10,0) for any decimal(<precision>) string. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)