You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/10/19 00:36:05 UTC

[jira] [Comment Edited] (PHOENIX-2313) TypeMismatchException thrown while querying a table that has an index with a Boolean

    [ https://issues.apache.org/jira/browse/PHOENIX-2313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14962662#comment-14962662 ] 

James Taylor edited comment on PHOENIX-2313 at 10/18/15 10:35 PM:
------------------------------------------------------------------

Addendum patch with more lower level unit tests. When an index was used, it wasn't interpreting the value correctly. I'm not sure if this is going to fix the test failures as I'm unable to reproduce them. However, the boolean value when indexed is interpreted correctly now.


was (Author: jamestaylor):
Addendum patch with more lower level unit tests. When an index was used, it wasn't interpreting the value correctly.

> TypeMismatchException thrown while querying a table that has an index with a Boolean
> ------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2313
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2313
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.3.0, 4.4.0, 4.5.0
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>             Fix For: 4.6.0
>
>         Attachments: PHOENIX-2313.patch, PHOENIX-2313_addendum.patch
>
>
> Getting below exception scanning through index on boolean column.
> {noformat}
> java.lang.RuntimeException: org.apache.phoenix.schema.TypeMismatchException: ERROR 203 (22005): Type mismatch. DECIMAL cannot be coerced to BOOLEAN 
> at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2440) 
> at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2074) 
> at sqlline.SqlLine.print(SqlLine.java:1735) 
> at sqlline.SqlLine$Commands.execute(SqlLine.java:3683) 
> at sqlline.SqlLine$Commands.sql(SqlLine.java:3584) 
> at sqlline.SqlLine.dispatch(SqlLine.java:821) 
> at sqlline.SqlLine.begin(SqlLine.java:699) 
> at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441) 
> at sqlline.SqlLine.main(SqlLine.java:424) 
> {noformat}
> Here are simple steps to reproduce
> {noformat}
> CREATE TABLE TABLE_TEST (PK INTEGER PRIMARY KEY, COL1 BOOLEAN);
> UPSERT INTO TABLE_TEST VALUES (1, true);
> UPSERT INTO TABLE_TEST VALUES (2, false);
> SELECT * FROM TABLE_TEST;
> CREATE INDEX TABLE_TEST_IDX ON TABLE_TEST(COL1);
> SELECT * FROM TABLE_TEST;
> DROP TABLE TABLE_TEST;
> {noformat}



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