You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "Jongyoung Park (JIRA)" <ji...@apache.org> on 2015/08/04 09:59:04 UTC

[jira] [Created] (TAJO-1741) Two tables having same time zone display different timestamps

Jongyoung Park created TAJO-1741:
------------------------------------

             Summary: Two tables having same time zone display different timestamps
                 Key: TAJO-1741
                 URL: https://issues.apache.org/jira/browse/TAJO-1741
             Project: Tajo
          Issue Type: Bug
    Affects Versions: 0.10.1
            Reporter: Jongyoung Park


Create two tables with same scheme. Note 'GMT+9'.
(Table names are *timezone* and *timezone_text*)

{code:sql}
CREATE EXTERNAL TABLE timezone 
(t_timestamp TIMESTAMP, 
t_date DATE) 
USING TEXT WITH ('timezone'='GMT+9') 
LOCATION 'hdfs://localhost:8020/timezone';
{code}

Timezone table already has data.

{noformat}
1980-4-1 01:50:30.010|1980-04-01
80/4/1 1:50:30 AM|80/4/1
1980 April 1 1:50:30|1980-04-01
{noformat}

Then, copy data to timezone_text.

{code:sql}
INSERTINTO timezone_text SELECT * FROM timezone;
{code}

Check timezone_text with some editor. It looks ok.

{noformat}
1980-04-01 01:50:30.01+09|1980-04-01
1980-04-01 01:50:30+09|1980-04-01
1980-04-01 01:50:30+09|1980-04-01
{noformat}

But in tsql, two tables show different time values.

{noformat:title=select * from timezone}
t_timestamp,  t_date
-------------------------------
1980-04-01 01:50:30.01,  1980-04-01
1980-04-01 01:50:30,  1980-04-01
1980-04-01 01:50:30,  1980-04-01
{noformat}

{noformat:title=select * from timezone_text}
t_timestamp,  t_date
-------------------------------
1980-03-31 16:50:30.01,  1980-04-01
1980-03-31 16:50:30,  1980-04-01
1980-03-31 16:50:30,  1980-04-01
{noformat}



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