hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Grover (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-3822) Casting from double to timestamp type seems inconsistent
Date Sat, 08 Apr 2017 19:51:42 GMT

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

Mark Grover reassigned HIVE-3822:
---------------------------------

    Assignee:     (was: Mark Grover)

> Casting from double to timestamp type seems inconsistent
> --------------------------------------------------------
>
>                 Key: HIVE-3822
>                 URL: https://issues.apache.org/jira/browse/HIVE-3822
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Mark Grover
>
> {code}
> select cast(1355944339 as timestamp) from decimal_3 limit 1;
> 1970-01-16 08:39:04.339
> select cast(1355944339000 as timestamp) from decimal_3 limit 1;
> 2012-12-19 11:12:19
> select cast(1355944339.123456789 as timestamp) from decimal_3 limit 1;
> 2012-12-19 11:12:19.1234567
> {code}
> If specifying the unixTimestamp without a decimal point, we need to specify the millisecond
timestamp. If specifying with a decimal point, we need to specify only the second timestamp
and the rest goes after decimal. Moreover, it seems like some precision is lost (notice '89'
are lost in the last query.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message