phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dong-iL, Kim" <kim.s...@gmail.com>
Subject Re: ERROR 201 (22000) illegal data error, expected length at least 4 but had ...
Date Fri, 05 Aug 2016 14:30:07 GMT
oh.  phoenix version is 4.7.0 and on EMR.
Thx.

> On Aug 5, 2016, at 11:27 PM, Dong-iL, Kim <kim.same@gmail.com> wrote:
> 
> Hi
> I’ve create a table in phoenix. 
> 
> CREATE TABLE WINLOSS (
>    dayNumber VARCHAR NOT NULL,
>    type VARCHAR NOT NULL,
>    historyId VARCHAR NOT NULL,
>    seq INTEGER NOT NULL,
>    timestamp BIGINT,
>    name VARCHAR,
>    gameType VARCHAR,
>    playType VARCHAR,
>    gameKind VARCHAR,
>    onRitt BOOLEAN,
>    contributedAmount BIGINT,
>    payAmount BIGINT
>    CONSTRAINT rowid PRIMARY KEY(dayNumber, type, historyId, seq)
> ) default_column_family = 'winloss';
> 
> insert data through hbase.
> 
> and I got an error when querying table.
> just like this.
> 
> select * from WINLESS;
> 
> Error: ERROR 201 (22000): Illegal data. Expected length of at least 4 bytes, but had
1 (state=22000,code=201)
> java.sql.SQLException: ERROR 201 (22000): Illegal data. Expected length of at least 4
bytes, but had 1
> 	at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:422)
> 	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
> 	at org.apache.phoenix.schema.types.PDataType.checkForSufficientLength(PDataType.java:274)
> 	at org.apache.phoenix.schema.types.PInteger$IntCodec.decodeInt(PInteger.java:183)
> 	at org.apache.phoenix.schema.types.PInteger.toObject(PInteger.java:81)
> 	at org.apache.phoenix.schema.types.PInteger.toObject(PInteger.java:28)
> 	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:985)
> 	at org.apache.phoenix.compile.ExpressionProjector.getValue(ExpressionProjector.java:75)
> 	at org.apache.phoenix.jdbc.PhoenixResultSet.getObject(PhoenixResultSet.java:524)
> 	at sqlline.Rows$Row.<init>(Rows.java:157)
> 	at sqlline.BufferedRows.<init>(BufferedRows.java:38)
> 	at sqlline.SqlLine.print(SqlLine.java:1650)
> 	at sqlline.Commands.execute(Commands.java:833)
> 	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)
> 
> what shall I do?
> 
> Thanks.


Mime
View raw message