You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2016/01/23 23:04:39 UTC

[jira] [Resolved] (PHOENIX-2053) The Expression IN has Bug when the params are less than zero

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

James Taylor resolved PHOENIX-2053.
-----------------------------------
    Resolution: Not A Problem

Fixed in prior release.

> The Expression  IN  has Bug when the params are less than zero
> --------------------------------------------------------------
>
>                 Key: PHOENIX-2053
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2053
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.3.0
>            Reporter: PeiLiping
>
> drop table test;
> create table test(a integer not null,b integer not null, c integer not null , d integer constraint pk primary key (a,b,c) ) compression='SNAPPY' , TTL=86400  split on (2,3,4,5,6,7,8,9,10);
> upsert into test values (1,-1,1,1) ;
> upsert into test values (2,-2,2,1) ;
> upsert into test values (3,-3,3,1) ;
> upsert into test values (4,-4,4,1) ;
> upsert into test values (5,-5,5,1) ;
> upsert into test values (6,-6,6,1) ;
> select c,sum(d) from test where a between 0 and 10 and b in (-2,-4,-5,-1) group by c ;
> +------------------------------------------+------------------------------------------+
> |                    C                     |                  SUM(D)                  |
> +------------------------------------------+------------------------------------------+
> | 5                                        | 1                                        |
> +------------------------------------------+------------------------------------------+
> select c,sum(d) from test where a between 0 and 10 and (0-b) in (2,4,5,1) group by c ;
> +------------------------------------------+------------------------------------------+
> |                    C                     |                  SUM(D)                  |
> +------------------------------------------+------------------------------------------+
> | 1                                        | 1                                        |
> | 2                                        | 1                                        |
> | 4                                        | 1                                        |
> | 5                                        | 1                                        |
> +------------------------------------------+------------------------------------------+



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)