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

Markus Steindl updated ORC-457:
-------------------------------
    Description: 
We don't get the original timestamp in the following example.
The timestamp is shifted precisely by the UTC Offset

{{CREATE TABLE `timestamp_test_orc_2`(}}
{{`ts_double` double,}}
{{`ts` timestamp)}}
{{stored as orc;}}

{{insert into timestamp_test_orc_2}}
{{select * from (select 1.5e9, cast(1.5e9 as timestamp)) t;}}

{{select ts, cast(ts_double as timestamp), cast(ts as double) - ts_double from 
timestamp_test_orc_2;}}

{{-- 2017-07-14 04:40:00     2017-07-14 02:40:00     7200.0}}

  was:
We don't get the original timestamp in the following example.
The timestamp is shifted precisely by the UTC Offset

{{CREATE TABLE `timestamp_test_orc_2`(}}
{{ `ts_double` double,}}
 {{`ts` timestamp)}}
 {{stored as orc}}
{{insert into timestamp_test_orc_2}}
{{select * from (select 1.5e9, cast(1.5e9 as timestamp)) t;}}

{{select ts, cast(ts_double as timestamp), cast(ts as double) - ts_double from 
timestamp_test_orc_2;}}

{{-- 2017-07-14 04:40:00     2017-07-14 02:40:00     7200.0}}


> If a timestamp is inserted using INSERT INTO ... SELECT and selected again 
> the value is shifted
> -----------------------------------------------------------------------------------------------
>
>                 Key: ORC-457
>                 URL: https://issues.apache.org/jira/browse/ORC-457
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Markus Steindl
>            Priority: Major
>
> We don't get the original timestamp in the following example.
> The timestamp is shifted precisely by the UTC Offset
> {{CREATE TABLE `timestamp_test_orc_2`(}}
> {{`ts_double` double,}}
> {{`ts` timestamp)}}
> {{stored as orc;}}
> {{insert into timestamp_test_orc_2}}
> {{select * from (select 1.5e9, cast(1.5e9 as timestamp)) t;}}
> {{select ts, cast(ts_double as timestamp), cast(ts as double) - ts_double 
> from timestamp_test_orc_2;}}
> {{-- 2017-07-14 04:40:00     2017-07-14 02:40:00     7200.0}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to