phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammad Adnan Raza <adnanfai...@gmail.com>
Subject Re: How phoenix converts Integer to byte array under the hood
Date Tue, 22 Mar 2016 14:15:43 GMT
I am changing my question a bit to be more precise...
Given a phoenix table with INTEGER column type. And if I fire upsert
statement with integer value. How phoenix converts it to byte array and put
in the Hbase table.
Or if anyone can tell me which class is responsible for that conversion so
I can look that code.



On Tue, Mar 22, 2016 at 2:00 PM, Mohammad Adnan Raza <adnanfaizan@gmail.com>
wrote:

> Hello Everyone,
>
> I have created phoenix table like this
>
> CREATE TABLE PRODUCT_DETAILS(NAME VARCHAR NOT NULL PRIMARY KEY,CF.VOLUME
> INTEGER,CF.PRICE INTEGER,CF.DISCOUNT INTEGER,CF.BASELINE INTEGER,CF.UPLIFT
> INTEGER,CF.FINALPRICE INTEGER,CF.SALEPRICE INTEGER);
>
> Now the datatype Integer is 4 byte signed integer. I wonder how phoenix
> converts this to hbase specific byte array.
> https://phoenix.apache.org/language/datatypes.html link does talk about
> conversion of other data types but not for INTEGER. For example
> UNSIGNED_INT is converted as Bytes.toInt(). I don't get a proper method for
> integer.
> anyone knows about it?
>
> --
>
> *With Best Regards,*
>
> *       Mohd Adnan*
>
>


-- 

*With Best Regards,*

*       Mohd Adnan*

*       Feature Development Lead*
       *Mobile               +91-7498194516 *


*       Blog                   adnanfaizan.blogspot.in
<http://adnanfaizan.blogspot.in>*

Mime
View raw message