phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samarth Jain <samarth.j...@gmail.com>
Subject Re: Question on Binary indexes
Date Wed, 26 Mar 2014 22:49:08 GMT
Hi Dan,

Thanks for reporting.

I am working on a fix for this. Please see:
https://issues.apache.org/jira/browse/PHOENIX-899

Thanks,
Samarth



On Wed, Mar 26, 2014 at 3:42 PM, Dan Di Spaltro <dan.dispaltro@gmail.com>wrote:

> I have a table with two indexes
>
> create table auth.account_users
>     (
>     ordered_id BINARY(16) not null PRIMARY KEY,
>     account_id BINARY(16) not null,
>     user_id BINARY(16) not null,
>     default BOOLEAN,
>     created_at TIMESTAMP
>     ) VERSIONS=1,IMMUTABLE_ROWS=true
>
>
> CREATE INDEX auth_account_users_user_idx ON auth.account_users(user_id)
>
> CREATE INDEX auth_account_users_account_idx ON
> auth.account_users(account_id)
>
> The creation works fine on this but during insert I get the following
> message, I am wondering is this intended?  Judging by the code it should
> work... I am using the 4.0 RC btw.
>
> java.lang.IllegalArgumentException: Unsupported non nullable index type
> BINARY
> at
> org.apache.phoenix.util.IndexUtil.getIndexColumnDataType(IndexUtil.java:81)
>  at
> org.apache.phoenix.index.IndexMaintainer.buildRowKey(IndexMaintainer.java:345)
> at
> org.apache.phoenix.index.IndexMaintainer.buildUpdateMutation(IndexMaintainer.java:391)
>  at
> org.apache.phoenix.util.IndexUtil.generateIndexData(IndexUtil.java:185)
> at org.apache.phoenix.execute.MutationState$1.next(MutationState.java:203)
>  at
> org.apache.phoenix.execute.MutationState$1.next(MutationState.java:186)
> at org.apache.phoenix.execute.MutationState.commit(MutationState.java:347)
>  at
> org.apache.phoenix.jdbc.PhoenixConnection.commit(PhoenixConnection.java:351)
> at
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:229)
>  at
> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:185)
> at
> org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:146)
>  at
> org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:151)
>
> --
> Dan Di Spaltro
>

Mime
View raw message