hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Tolpeko (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-12745) Hive Timestamp value change after joining two tables
Date Tue, 29 Aug 2017 17:43:00 GMT

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

Dmitry Tolpeko updated HIVE-12745:
----------------------------------
    Component/s:     (was: hpl/sql)

> Hive Timestamp value change after joining two tables
> ----------------------------------------------------
>
>                 Key: HIVE-12745
>                 URL: https://issues.apache.org/jira/browse/HIVE-12745
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: wyp
>            Assignee: Dmitry Tolpeko
>
> I have two Hive tables:test and test1:
> {code}
> CREATE TABLE `test`( `t` timestamp)
> CREATE TABLE `test1`( `t` timestamp)
> {code}
> they all holds a t value with Timestamp datatype,the contents of the two table as follow:
> {code}
> hive> select * from test1;
> OK
> 1970-01-01 00:00:00
> 1970-03-02 00:00:00
> Time taken: 0.091 seconds, Fetched: 2 row(s)
> hive> select * from test;
> OK
> 1970-01-01 00:00:00
> 1970-01-02 00:00:00
> Time taken: 0.085 seconds, Fetched: 2 row(s)
> {code}
> However when joining this two table, the returned timestamp value changed:
> {code}
> hive> select test.t, test1.t from test, test1;
> OK
> 1969-12-31 23:00:00	1970-01-01 00:00:00
> 1970-01-01 23:00:00	1970-01-01 00:00:00
> 1969-12-31 23:00:00	1970-03-02 00:00:00
> 1970-01-01 23:00:00	1970-03-02 00:00:00
> Time taken: 54.347 seconds, Fetched: 4 row(s)
> {code}
> and I found the result is changed every time
> {code}
> hive> select test.t, test1.t from test, test1;
> OK
> 1970-01-01 00:00:00	1970-01-01 00:00:00
> 1970-01-02 00:00:00	1970-01-01 00:00:00
> 1970-01-01 00:00:00	1970-03-02 00:00:00
> 1970-01-02 00:00:00	1970-03-02 00:00:00
> Time taken: 26.308 seconds, Fetched: 4 row(s)
> {code}
> Any suggestion? Thanks



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

Mime
View raw message