phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Januszkiewicz <katamaran...@gmail.com>
Subject ROW_TIMESTAMP doesn't work with TIMESTAMP datatype.
Date Tue, 09 May 2017 14:41:50 GMT
I'm encountering the following issue with Phoenix:

create table rtt (ts TIMESTAMP PRIMARY KEY ROW_TIMESTAMP);
select * from rtt where ts < now();
java.lang.NullPointerException
        at org.apache.phoenix.compile.ScanRanges.getAscTimeRange(ScanRanges.java:680)
        at org.apache.phoenix.compile.ScanRanges.getRowTimestampColumnRange(ScanRanges.java:658)
        at org.apache.phoenix.compile.ScanRanges.create(ScanRanges.java:84)
        at org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOptimizer.java:305)
        at org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:149)
        at org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:100)
        at org.apache.phoenix.compile.QueryCompiler.compileSingleFlatQuery(QueryCompiler.java:556)
        at org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:507)
        at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:202)
        at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:157)
        at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:420)
        at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:394)
        at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:280)
        at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:270)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:269)
        at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1515)
        at sqlline.Commands.execute(Commands.java:822)
        at sqlline.Commands.sql(Commands.java:732)
        at sqlline.SqlLine.dispatch(SqlLine.java:813)
        at sqlline.SqlLine.begin(SqlLine.java:686)
        at sqlline.SqlLine.start(SqlLine.java:398)
        at sqlline.SqlLine.main(SqlLine.java:291)

There is no problem when I use the TIME, DATE, and UNSIGNED_LONG datatypes.
I am using phoenix-4.9 from the phoenix-for-cloudera branch, so I'm
not sure if this is a bug in the main branch or just in mine.
Could anyone check if you also encounter this behavior?

Mime
View raw message