Mujtaba Chohan created PHOENIX-893:
--------------------------------------

             Summary: ArrayIndexOutOfBoundsException on query with IN clause
                 Key: PHOENIX-893
                 URL: https://issues.apache.org/jira/browse/PHOENIX-893
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 3.0.0, 4.0.0
            Reporter: Mujtaba Chohan
            Assignee: James Taylor


Running the following query on a composite pk table causes 
ArrayIndexOutOfBoundsException.

Query: select * from T where (PK1,PK2) IN (('a','a'),('b','b'))

Exception:
java.lang.ArrayIndexOutOfBoundsException: 1
        at org.apache.phoenix.schema.ValueSchema.getField(ValueSchema.java:300)
        at org.apache.phoenix.util.ScanUtil.setKey(ScanUtil.java:260)
        at 
org.apache.phoenix.compile.ScanRanges.getPointKeys(ScanRanges.java:185)
        at org.apache.phoenix.compile.ScanRanges.create(ScanRanges.java:61)
        at 
org.apache.phoenix.compile.WhereOptimizer.pushKeyExpressionsToScan(WhereOptimizer.java:223)
        at 
org.apache.phoenix.compile.WhereCompiler.compile(WhereCompiler.java:105)
        at 
org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:260)
        at 
org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:128)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:264)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:253)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:320)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableExplainStatement.compilePlan(PhoenixStatement.java:300)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:199)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:922)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to