oh. phoenix version is 4.7.0 and on EMR.
Thx.
> On Aug 5, 2016, at 11:27 PM, Dong-iL, Kim <kim.s...@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.