It seems ARRAY[1,2] is not being implicitly cast to a unsigned long array. Can you try an explicit cast? What if you declare f_array as (signed) long array? Will have a look at code and get back to you.
On Thursday, March 5, 2015, Sergey Belousov <[email protected]> wrote: > Hi all > > I keep banging my head against the wall and kind of out of ideas at this > point so I hope someone can give me little helping hand. > It safe to say that I am using almost 4.3 (build just before it released) > > Here is what I having problem with > > CREATE TABLE IF NOT EXISTS dev.t1 > ( > f_int UNSIGNED_INT NOT NULL, > f_long UNSIGNED_LONG NOT NULL, > f_array UNSIGNED_LONG ARRAY[] NOT NULL, > > CONSTRAINT pk PRIMARY KEY (f_int, f_long, f_array) > ); > > upsert into dev.t1 (f_int,f_long,f_array) values(1,1,ARRAY[1,2]); > > and getting > > Error: ERROR 203 (22005): Type mismatch. INTEGER ARRAY and UNSIGNED_LONG > ARRAY for expression: > org.apache.phoenix.schema.types.PhoenixArray$PrimitiveIntPhoenixArray@d32d5 > in column F_ARRAY (state=22005,code=203) > > I tried ARRAY[2] and having same problem > > !describe dev.t1; > > +-------------------+--------------------+--------------------+---------------------+---------+ > | TABLE_CAT | TABLE_SCHEM | TABLE_NAME | > COLUMN_NAME | | > > +-------------------+--------------------+--------------------+---------------------+---------+ > | null | DEV | T1 | F_INT > | 4 | > | null | DEV | T1 | F_LONG > | -5 | > | null | DEV | T1 | F_ARRAY > | 2003 | > > +-------------------+--------------------+--------------------+---------------------+---------+ > > Any idea what I am doing wrong ? > > Thank you > S >
