You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Sergey Soldatov (JIRA)" <ji...@apache.org> on 2016/04/21 02:34:25 UTC

[jira] [Updated] (PHOENIX-2845) Timestamp ignores nanos in literal expressions

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

Sergey Soldatov updated PHOENIX-2845:
-------------------------------------
    Description: 
Phoenix strips nanos in Timestamp. Simple test case:
{noformat}
create table x (id bigint primary key, t timestamp);
upsert into x values (1, TIMESTAMP'2015-01-01 00:00:00.123456');
upsert into x values (2, TIMESTAMP'2015-01-01 00:00:00.123457');
upsert into x values (3, TIMESTAMP'2015-01-01 00:00:00.123999');
{noformat}

HBase scan:
{noformat}
hbase(main):007:0> scan 'X'
ROW COLUMN+CELL
 \x80\x00\x00\x00\x00\x00\x00\x01 column=0:T, timestamp=1460646668779, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
 \x80\x00\x00\x00\x00\x00\x00\x02 column=0:T, timestamp=1460646673369, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
 \x80\x00\x00\x00\x00\x00\x00\x03 column=0:T, timestamp=1460646680294, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
{noformat} 

  was:
Phoenix strips nanos in Timestamp. Simple test case:
{noformat}
create table x (id bigint primary key, t timestamp);
upsert into x values (1, TIMESTAMP'2015-01-01 00:00:00.123456');
upsert into x values (2, TIMESTAMP'2015-01-01 00:00:00.123457');
upsert into x values (3, TIMESTAMP'2015-01-01 00:00:00.123999');
{noformat}

HBase scan:
{noformat}
hbase(main):007:0> scan 'X'
ROW COLUMN+CELL
 \x80\x00\x00\x00\x00\x00\x00\x01 column=0:T, timestamp=1460646668779, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
 \x80\x00\x00\x00\x00\x00\x00\x02 column=0:T, timestamp=1460646673369,
value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
 \x80\x00\x00\x00\x00\x00\x00\x03 column=0:T, timestamp=1460646680294,
value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
{noformat} 


> Timestamp ignores nanos in literal expressions
> ----------------------------------------------
>
>                 Key: PHOENIX-2845
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2845
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Sergey Soldatov
>            Assignee: Sergey Soldatov
>
> Phoenix strips nanos in Timestamp. Simple test case:
> {noformat}
> create table x (id bigint primary key, t timestamp);
> upsert into x values (1, TIMESTAMP'2015-01-01 00:00:00.123456');
> upsert into x values (2, TIMESTAMP'2015-01-01 00:00:00.123457');
> upsert into x values (3, TIMESTAMP'2015-01-01 00:00:00.123999');
> {noformat}
> HBase scan:
> {noformat}
> hbase(main):007:0> scan 'X'
> ROW COLUMN+CELL
>  \x80\x00\x00\x00\x00\x00\x00\x01 column=0:T, timestamp=1460646668779, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
>  \x80\x00\x00\x00\x00\x00\x00\x02 column=0:T, timestamp=1460646673369, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
>  \x80\x00\x00\x00\x00\x00\x00\x03 column=0:T, timestamp=1460646680294, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
> {noformat} 



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