phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pierre lacave <pie...@lacave.me>
Subject Row timestamp support in 4.6
Date Fri, 04 Dec 2015 18:21:40 GMT
Hi,

I am trying to use the ROW_TIMESTAMP mapping featured in 4.6 as described
in https <https://phoenix.apache.org/rowtimestamp.html>://
<https://phoenix.apache.org/rowtimestamp.html>phoenix.apache.org
<https://phoenix.apache.org/rowtimestamp.html>/
<https://phoenix.apache.org/rowtimestamp.html>rowtimestamp.html
<https://phoenix.apache.org/rowtimestamp.html>

However when inserting a timestamp in nanosecond I get the following
exception saying the value cannot be less than zero?

Inserting micros,micros or sec result in same result?

Any idea what's happening?

Thanks

0: jdbc:phoenix:hadoop1-dc:2181:/hbase> CREATE TABLE TEST (t UNSIGNED_LONG
NOT NULL CONSTRAINT pk PRIMARY KEY (t ROW_TIMESTAMP) );

No rows affected (1.654 seconds)

0: jdbc:phoenix:hadoop1-dc:2181:/hbase> UPSERT INTO TEST (t) VALUES
(1449161081000000001);

Error: ERROR 201 (22000): Illegal data. Value of a column designated as
ROW_TIMESTAMP cannot be less than zero (state=22000,code=201)

java.sql.SQLException: ERROR 201 (22000): Illegal data. Value of a column
designated as ROW_TIMESTAMP cannot be less than zero

at
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:396)

at
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)

at
org.apache.phoenix.schema.IllegalDataException.<init>(IllegalDataException.java:38)

at
org.apache.phoenix.compile.UpsertCompiler.setValues(UpsertCompiler.java:135)

at
org.apache.phoenix.compile.UpsertCompiler.access$400(UpsertCompiler.java:114)

at
org.apache.phoenix.compile.UpsertCompiler$3.execute(UpsertCompiler.java:882)

at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:322)

at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:314)

at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)

at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:312)

at
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1435)

at sqlline.Commands.execute(Commands.java:822)

at sqlline.Commands.sql(Commands.java:732)

at sqlline.SqlLine.dispatch(SqlLine.java:808)

at sqlline.SqlLine.begin(SqlLine.java:681)

at sqlline.SqlLine.start(SqlLine.java:398)

at sqlline.SqlLine.main(SqlLine.java:292)

Mime
View raw message