hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-13914) Changing a column of orc table from float to double adds some fractional digits
Date Thu, 02 Jun 2016 09:32:59 GMT

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

Jesus Camacho Rodriguez updated HIVE-13914:
-------------------------------------------
    Target Version/s: 2.2.0  (was: 2.1.0)

> Changing a column of orc table from float to double adds some fractional digits
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-13914
>                 URL: https://issues.apache.org/jira/browse/HIVE-13914
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Takahiko Saito
>
> Some fractional digits are added after altering a float column of an orc table to double:
> {noformat}
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> drop table test;
> No rows affected (0.233 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> create table test (f float) stored
as orc;
> No rows affected (0.095 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> insert into table test values(-35664.76),(29497.34);
> No rows affected (2.206 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test;
> +------------+--+
> |   test.f   |
> +------------+--+
> | -35664.76  |
> | 29497.34   |
> +------------+--+
> 2 rows selected (0.131 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> alter table test change column f f
double;
> No rows affected (0.183 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test;
> +------------------+--+
> |      test.f      |
> +------------------+--+
> | -35664.76171875  |
> | 29497.33984375   |
> +------------------+--+
> 2 rows selected (0.114 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
> {noformat}
> The issue is NOT seen with text formatted table:
> {noformat}
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> create table test (f float) ;
> No rows affected (0.131 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> insert into table test values(-35664.76),(29497.34);
> No rows affected (2.114 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test;
> +------------+--+
> |   test.f   |
> +------------+--+
> | -35664.76  |
> | 29497.34   |
> +------------+--+
> 2 rows selected (0.163 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> alter table test change column f f
double;
> No rows affected (0.184 seconds)
> 0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test;
> +------------+--+
> |   test.f   |
> +------------+--+
> | -35664.76  |
> | 29497.34   |
> +------------+--+
> 2 rows selected (0.11 seconds)
> {noformat}



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

Mime
View raw message