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

Julian Jaffe updated PHOENIX-3297:
----------------------------------
    Affects Version/s: 4.8.0

> Combining an RVC query and a filter on a datatype smaller than 8 bytes causes 
> an Illegal Data Exception
> -------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3297
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3297
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.6.0, 4.8.0
>            Reporter: Julian Jaffe
>
> Combining an RVC query and a filter on a primary key column with a datatype 
> smaller than 8 bytes causes an Illegal Data Exception.
> {code:sql}0: jdbc:phoenix:xxxx> CREATE TABLE IF NOT EXISTS TEST.RVC_TEST 
> (COLONE BIGINT NOT NULL, COLTWO BIGINT NOT NULL, COLTHREE TINYINT NOT NULL, 
> COLFOUR BIGINT NOT NULL, COLFIVE VARCHAR, CONSTRAINT "test_pk" PRIMARY KEY 
> (COLONE, COLTWO, COLTHREE, COLFOUR));
> No rows affected (1.167 seconds)
> 0: jdbc:phoenix:xxxx> 
> 0: jdbc:phoenix:xxxx> UPSERT INTO TEST.RVC_TEST VALUES (1, 2, 3, 4, 'row 1');
> 1 row affected (0.169 seconds)
> 0: jdbc:phoenix:labs-darth-journalnode-lv-102> 
> 0: jdbc:phoenix:labs-darth-journalnode-lv-102> SELECT * FROM TEST.RVC_TEST 
> WHERE (COLONE, COLTWO) IN (1,2) AND COLTHREE=3;
> Error: ERROR 201 (22000): Illegal data. Expected length of at least 8 bytes, 
> but had 1 (state=22000,code=201)
> java.sql.SQLException: ERROR 201 (22000): Illegal data. Expected length of at 
> least 8 bytes, but had 1
>       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.types.PDataType.checkForSufficientLength(PDataType.java:273)
>       at 
> org.apache.phoenix.schema.types.PLong$LongCodec.decodeLong(PLong.java:229)
>       at org.apache.phoenix.schema.types.PLong.toObject(PLong.java:114)
>       at org.apache.phoenix.schema.types.PLong.toObject(PLong.java:30)
>       at 
> org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:967)
>       at 
> org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:971)
>       at 
> org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:1000)
>       at 
> org.apache.phoenix.schema.types.PDataType.toStringLiteral(PDataType.java:1073)
>       at 
> org.apache.phoenix.schema.types.PDataType.toStringLiteral(PDataType.java:1069)
>       at 
> org.apache.phoenix.iterate.ExplainTable.appendPKColumnValue(ExplainTable.java:194)
>       at 
> org.apache.phoenix.iterate.ExplainTable.appendScanRow(ExplainTable.java:270)
>       at 
> org.apache.phoenix.iterate.ExplainTable.appendKeyRanges(ExplainTable.java:282)
>       at 
> org.apache.phoenix.iterate.ExplainTable.explain(ExplainTable.java:125)
>       at 
> org.apache.phoenix.iterate.BaseResultIterators.explain(BaseResultIterators.java:728)
>       at 
> org.apache.phoenix.iterate.RoundRobinResultIterator.explain(RoundRobinResultIterator.java:153)
>       at 
> org.apache.phoenix.execute.BaseQueryPlan.getPlanSteps(BaseQueryPlan.java:438)
>       at 
> org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:295)
>       at 
> org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:176)
>       at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:268)
>       at 
> org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:258)
>       at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>       at 
> org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:257)
>       at 
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1438)
>       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)
> {code}
> I wasn't able to find any other Phoenix issues directly related to this, but 
> it seems that PHOENIX-2942 and PHOENIX-2980 may be related.



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

Reply via email to