phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bulvik, Noam" <Noam.Bul...@teoco.com>
Subject error when using hint on global index where table is using row timestamp mapping
Date Sun, 01 Oct 2017 09:01:11 GMT
Hi

I have create a table and used the row timestamp mapping functionality. The key of the table
is <timestamp_column>+<row_id> column. I also created global index on one of the
columns of the table  (XXX not one of the key columns).

When I am doing  explain select * from my_table where xxx='<value>' I see that index
is not used  (even though index is defined on XX column )

CLIENT 9-CHUNK PARALLEL 9-WAY ROUND ROBIN FULL SCAN OVER MY_TABLE
    ROW TIMESTAMP FILTER [0, 1506847791496)
    SERVER FILTER BY XXX = '<some value>'

When I am adding hint I get the following exception (this is from explain ..., I get similar
error when running the actual query )

java.lang.NullPointerException
               at org.apache.phoenix.compile.ScanRanges.getAscTimeRange(ScanRanges.java:674)
               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.WhereOptimizer.pushKeyExpressionsToScan(WhereOptimizer.java:104)
               at org.apache.phoenix.compile.WhereOptimizer.getKeyExpressionCombination(WhereOptimizer.java:385)
               at org.apache.phoenix.compile.QueryCompiler.getKeyExpressionCombinations(QueryCompiler.java:460)
               at org.apache.phoenix.compile.QueryCompiler.compileJoinQuery(QueryCompiler.java:314)
               at org.apache.phoenix.compile.QueryCompiler.compileSelect(QueryCompiler.java:200)
               at org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:157)
               at org.apache.phoenix.optimize.QueryOptimizer.addPlan(QueryOptimizer.java:302)
               at org.apache.phoenix.optimize.QueryOptimizer.getHintedQueryPlan(QueryOptimizer.java:196)
               at org.apache.phoenix.optimize.QueryOptimizer.getApplicablePlans(QueryOptimizer.java:137)
               at org.apache.phoenix.optimize.QueryOptimizer.optimize(QueryOptimizer.java:94)
               at org.apache.phoenix.optimize.QueryOptimizer.optimize(QueryOptimizer.java:80)
               at org.apache.phoenix.execute.BaseQueryPlan.getExplainPlan(BaseQueryPlan.java:505)
               at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:568)
               at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:547)
               at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:299)
               at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:289)
               at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
               at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:288)
               at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:282)
               at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1711)
               at workbench.sql.SqlCommand.execute(SqlCommand.java:555)
               at workbench.sql.StatementRunner.runStatement(StatementRunner.java:584)
               at workbench.gui.sql.SqlPanel.displayResult(SqlPanel.java:3433)
               at workbench.gui.sql.SqlPanel.runStatement(SqlPanel.java:2169)
               at workbench.gui.sql.SqlPanel$4.run(SqlPanel.java:2107)



I am using phoenix 4.11


Noam


________________________________

PRIVILEGED AND CONFIDENTIAL
PLEASE NOTE: The information contained in this message is privileged and confidential, and
is intended only for the use of the individual to whom it is addressed and others who have
been specifically authorized to receive it. If you are not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, or if any problems occur with
transmission, please contact sender. Thank you.

Mime
View raw message