q79969786 created PHOENIX-1695:
----------------------------------
Summary: Phoenix matching the HBase Bytes.toBytes(int) method
matching the HBase Bytes.toBytes(int) method
Key: PHOENIX-1695
URL: https://issues.apache.org/jira/browse/PHOENIX-1695
Project: Phoenix
Issue Type: Bug
Affects Versions: 4.2
Environment: HBase-0.98+Phoenix-4.2
Reporter: q79969786
1. Put data like below:
HTableInterface tableOrder = connection.getTable(newTableName);
List<Put> puts = new ArrayList<Put>();
Put put1 = new Put(Bytes.toBytes("1"));
put1.add(DEFAULT_CF, Bytes.toBytes("ID"), Bytes.toBytes(3));
put1.add(DEFAULT_CF, Bytes.toBytes("NAME"), Bytes.toBytes("Positive"));
puts.add(put1);
Put put2 = new Put(Bytes.toBytes("2"));
put2.add(DEFAULT_CF, Bytes.toBytes("ID"), Bytes.toBytes(-3));
put2.add(DEFAULT_CF, Bytes.toBytes("NAME"), Bytes.toBytes("Negative"));
puts.add(put2);
tableOrder.put(puts);
2. Map table as below:
CREATE VIEW T_PC_ORDER30 ( PK VARCHAR PRIMARY KEY, CF.ID INTEGER, CF.NAME
VARCHAR );
3.Select data as below
SELECT * FROM T_PC_ORDER30;
but the result is:
1 -2147483645 Positive
2 2147483645 Negative
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)