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

Sergey Shelukhin updated HIVE-13945:
------------------------------------
    Attachment: HIVE-13945.02.patch

First batch of out file updates.
I didn't look at TestBeeLineWithArgs which is broken.
Added new test decimal_divide; it appears that precision for int/decimal 
division is chosen such that the results are rounded from what it was with 
double. Need to look into that.
vector_struct_in and orc_ppd_basic are tests that have suspicious diffs, need 
to investigate further.
TestBeeLineWithArgs straight up fails, need to look.

Another interesting effect - where previously float-op-literal arithmetic would 
be double (being float-op-double), now it's float-op-decimal, which resolves to 
float result; that can affect precision.

> Decimal value is displayed as rounded when selecting where clause with that 
> decimal value.
> ------------------------------------------------------------------------------------------
>
>                 Key: HIVE-13945
>                 URL: https://issues.apache.org/jira/browse/HIVE-13945
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Takahiko Saito
>            Assignee: Sergey Shelukhin
>            Priority: Critical
>         Attachments: HIVE-13945.01.patch, HIVE-13945.02.patch, 
> HIVE-13945.patch
>
>
> Create a table withe a column of decimal type(38,18) and insert 
> '4327269606205.029297'. Then select with that value displays its rounded 
> value, which is 4327269606205.029300000000000000
> {noformat}
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> drop table if exists test;
> No rows affected (0.229 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> create table test (dc 
> decimal(38,18));
> No rows affected (0.125 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> insert into table test values 
> (4327269606205.029297);
> No rows affected (2.372 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test;
> +-----------------------------------+--+
> |              test.dc              |
> +-----------------------------------+--+
> | 4327269606205.029297000000000000  |
> +-----------------------------------+--+
> 1 row selected (0.123 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test where dc = 
> 4327269606205.029297000000000000;
> +-----------------------------------+--+
> |              test.dc              |
> +-----------------------------------+--+
> | 4327269606205.029300000000000000  |
> +-----------------------------------+--+
> 1 row selected (0.109 seconds)
> {noformat}



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

Reply via email to