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

James Taylor updated PHOENIX-1760:
----------------------------------
    Summary: Support type for epoch time in seconds  (was: CAST epoch (in 
seconds) AS TIME/DATE/TIMESTAMP fails.)

> Support type for epoch time in seconds
> --------------------------------------
>
>                 Key: PHOENIX-1760
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1760
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Serhiy Bilousov
>            Priority: Minor
>
> When epoch time (in seconds, 4 byte) used in attempt to CAST it AS 
> TIME/DATE/TIMESTAMP PHOENIX fails with Type mismatch error.
> {noformat}
> -- 19 Mar 2015 14:46:30 GMT (1426776390 in sec, 1426776390000 in milisec)
> select cast(1426776390 AS TIMESTAMP), cast(1426776390000 AS TIMESTAMP) from 
> system.catalog LIMIT 1;
> Error: ERROR 203 (22005): Type mismatch. INTEGER and TIMESTAMP for 1426776390 
> (state=22005,code=203)
> {noformat}
> {quote}
> The C standard library data type time_t, used on operating systems such as 
> Unix, is typically implemented as either a 32-bit or a 64-bit signed integer 
> value, counting the number of seconds since the start of the Unix epoch 
> (midnight UTC of 1 January 1970). Systems employing a 32-bit type are 
> susceptible to the Year 2038 problem, so many implementations have moved to a 
> wider 64-bit type, with a maximal value of 263−1 corresponding to a point in 
> time 292 billion years from now.
> {quote}



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

Reply via email to