You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Yuming Wang (JIRA)" <ji...@apache.org> on 2016/07/02 05:40:11 UTC

[jira] [Closed] (PHOENIX-1695) Phoenix matching the HBase Bytes.toBytes(int) method cause numerical overflow

     [ https://issues.apache.org/jira/browse/PHOENIX-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yuming Wang closed PHOENIX-1695.
--------------------------------

> Phoenix matching the HBase Bytes.toBytes(int) method cause numerical overflow
> -----------------------------------------------------------------------------
>
>                 Key: PHOENIX-1695
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1695
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.2.0
>         Environment: HBase-0.98+Phoenix-4.2
>            Reporter: Yuming Wang
>
> 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)