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/18 10:46:45 UTC

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

    [ https://issues.apache.org/jira/browse/TAJO-1741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14700947#comment-14700947 ] 

Jongyoung Park commented on TAJO-1741:
--------------------------------------

Data in 'timezone_text'  have timezone itself like that:

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

So it looks timezone is processed twice - timezone of TimeMeta(record timezone) and timezone of table option.

> 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
>            Assignee: Jongyoung Park
>              Labels: timezone
>
> 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}
> INSERT INTO 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)