Are you wanting to interface with HBase-client data from Phoenix, or is it vice-versa? Phoenix's UNSIGNED_TINYINT type is the equivalent of using HBase's Bytes.putByte(byte[], int, byte). HBase's Bytes encodings do not preserve the sort order of negative values in encoded form, hence the OrderedBytes codec.
On Mon, Jun 29, 2015 at 6:22 AM, Svetozar Ivanov < [email protected]> wrote: > Is there a way to create numeric column in Apache Phoenix table or view > with flipped back sign bit? I want to used TINYINT type for instance but in > my HBase table is written value with flipped sign bit: > > ROW COLUMN+CELL > 1 column=0:_0, > timestamp=1435582427949, value= > 1 column=0:_boolean, > timestamp=1435582427949, value=\x01 > 1 column=0:_byte, > timestamp=1435582427949, value=\x81 > > So obviously \x81 is 10000001 represented in binary format, I would expect > 00000001 instead of it. Of course I want to use negative numbers too, > that's why UNSIGNED_TINYINT type is not solution for me. >
