phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2878) CURRENT_TIME fails to provide correct time when projected table is using
Date Wed, 04 May 2016 22:14:12 GMT

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

James Taylor commented on PHOENIX-2878:
---------------------------------------

Good catch, [~sergey.soldatov]. Would you mind reviewing and committing, [~maryannxue]?

> CURRENT_TIME fails to provide correct time when projected table is using
> ------------------------------------------------------------------------
>
>                 Key: PHOENIX-2878
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2878
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Sergey Soldatov
>            Assignee: Sergey Soldatov
>         Attachments: PHOENIX-2878-1.patch
>
>
> When the query is using projected table, the CURRENT_TIME() function may return zero
or outdated value. Simple test case:
> {noformat}
> CREATE TABLE T1 ( ID integer primary key);
> CREATE TABLE T2 ( ID integer primary key);
> UPSERT INTO T1 VALUES (1);
> UPSERT INTO T2 VALUES (1);
> select /*+ USE_SORT_MERGE_JOIN */ op.id, current_time() from t1 op where op.id in (select
id from t2);
> {noformat}
> The result: 
> {noformat}
> +--------+---------------------------------+
> | OP.ID  | TIME '1970-01-01 00:00:00.000'  |
> +--------+---------------------------------+
> | 1      | 1970-01-01 00:00:00.000         |
> +--------+---------------------------------+
> {noformat}



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

Mime
View raw message