phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fenny Thomas <>
Subject Re: Double value displayed wrong through Phoenix
Date Sun, 23 Nov 2014 02:47:40 GMT
As you're serializing using hbase's Bytes.toBytes(double), map your 
column type as UNSIGNED_DOUBLE. Details here -

Alternatively as Anil suggested, use phoenix's api (jdbc) or serialize 
using PDataType something like PDataType.DOUBLE.toBytes(double)

- Fenny Thomas

On 14-11-22 06:58 PM, Anil Gupta wrote:
> While writing data into HBase I would recommend you to use either Phoenix api or use
PDataType class of Phoenix. Phoenix serialization/deserialization is different from Bytes
> Hope this helps,
> Anil
> Sent from my iPhone
>> On Nov 22, 2014, at 1:06 PM, Bill Q <> wrote:
>> Hi,
>> I just started using Phoenix. I use HBase 0.98.3 Java API to put some double numbers
in the table. But the value displayed through Squirrel and Phoenix are different from what
I put in.
>> If I use HBase Java API to get the value from those inserted rows, the double values
are correct. So, it seems to be a display issue with Squirrel and Phoenix. For example, all
the negative number has displayed as positive number or really small negative number like
-0.0005, etc.
>> I used DOUBLE as the column type when I created the table in Phoenix. And used HBase
Java API Bytes.toByte(double) in the Put to insert the row.
>> Any suggestions?
>> Many thanks.
>> Bill

View raw message