phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anchal Agrawal <anc...@yahoo-inc.com>
Subject Signed long values in column
Date Wed, 29 Jul 2015 05:40:45 GMT
Hi,
I'm creating a Phoenix view of an existing HBase table on v4.4.0.

Command: CREATE VIEW "table_name" (pk VARBINARY PRIMARY KEY, "cf"."col" DATA_TYPE_HERE);
The col column has long values that are serialized by Bytes.toBytes(long) but since some values
are negative, I can't use UNSIGNED_LONG. I tried BIGINT instead since the documentation says
that it maps to java.lang.Long, but that resulted in incorrect column values. The datatype
documentation for UNSIGNED_LONG says "use the regular signed type instead" - which datatype
is this referring to? LONG isn't supported.

I could create the view with the column values as bytearrays and write a UDF to extract long
values, but I think that will add to the latency. Is there a way around this? I really appreciate
your help.

Sincerely,Anchal Agrawal
Mime
View raw message