phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2053) The Expression IN has Bug when the params are less than zero
Date Thu, 18 Jun 2015 21:11:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-2053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14592512#comment-14592512
] 

James Taylor commented on PHOENIX-2053:
---------------------------------------

Please provide the Phoenix version and the schema you're using. The following works fine in
4.4.0:
{code}
0: jdbc:phoenix:localhost> create table test (k integer primary key);
No rows affected (0.276 seconds)
0: jdbc:phoenix:localhost> upsert into test values(1);
1 row affected (0.02 seconds)
0: jdbc:phoenix:localhost> upsert into test values(2);
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost> upsert into test values(3);
1 row affected (0.004 seconds)
0: jdbc:phoenix:localhost> upsert into test values(-1);
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost> upsert into test values(-2);
1 row affected (0.004 seconds)
0: jdbc:phoenix:localhost> upsert into test values(-3);
1 row affected (0.004 seconds)
0: jdbc:phoenix:localhost> select * from test where k in (1,2,3);
+------------------------------------------+
|                    K                     |
+------------------------------------------+
| 1                                        |
| 2                                        |
| 3                                        |
+------------------------------------------+
3 rows selected (0.021 seconds)
0: jdbc:phoenix:localhost> select * from test where k in (-1);
+------------------------------------------+
|                    K                     |
+------------------------------------------+
| -1                                       |
+------------------------------------------+
1 row selected (0.021 seconds)
0: jdbc:phoenix:localhost> select * from test where k in (-1,-2,-3);
+------------------------------------------+
|                    K                     |
+------------------------------------------+
| -3                                       |
| -2                                       |
| -1                                       |
+------------------------------------------+
3 rows selected (0.021 seconds)
0: jdbc:phoenix:localhost> 
{code}

> 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
>
> select * from test where a in (1,2,3 )       is right
> select * from test where a in (-1 )              is right 
> but  select * from test where a in (-1,-2,-3)     is wrong
> I think when params are less then zero  the scan range is wrong  



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

Mime
View raw message