You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Pham Phuong Tu (JIRA)" <ji...@apache.org> on 2014/07/04 10:33:34 UTC

[jira] [Created] (PHOENIX-1057) Phoenix wrong range query result

Pham Phuong Tu created PHOENIX-1057:
---------------------------------------

             Summary: Phoenix wrong range query result
                 Key: PHOENIX-1057
                 URL: https://issues.apache.org/jira/browse/PHOENIX-1057
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.0.0
         Environment: Centos 6.5, Hbase 0.98
            Reporter: Pham Phuong Tu


Hi guys,

I have one big problem with Phoenix is some time, range query like: >, <, <=, >= return missing one or more result, 

E.g: 
>>> SELECT count(1) AS total, hour_time FROM device2 where hour_time >=1403974800 and hour_time < 1404061199 GROUP BY hour_time ORDER BY hour_time
+------------+------------+
|   TOTAL    | HOUR_TIME  |
+------------+------------+
| 90         | 1403974800 |
| 73         | 1403978400 |
| 70         | 1403982000 |
| 66         | 1403985600 |
| 51         | 1403989200 |
| 39         | 1403992800 |
| 33         | 1403996400 |
| 73         | 1404003600 |
| 77         | 1404007200 |
| 77         | 1404010800 |
| 97         | 1404014400 |
| 74         | 1404018000 |
| 92         | 1404021600 |
| 84         | 1404025200 |
| 83         | 1404028800 |
| 89         | 1404032400 |
| 93         | 1404036000 |
| 93         | 1404039600 |
| 99         | 1404043200 |
| 120        | 1404046800 |
| 113        | 1404050400 |
| 85         | 1404054000 |
| 80         | 1404057600 |
+------------+------------+

The result of this query return missing value 1404000000 of hour_time, of course 1403974800 <= 1404000000 < 1404061199.

After run 2 queries below, we can see that value 1404000000 exist in device2 table:
>>> select distinct hour_time from device2 where day_time = 1403974800 order by hour_time;
+------------+
| HOUR_TIME  |
+------------+
| 1403974800 |
| 1403978400 |
| 1403982000 |
| 1403985600 |
| 1403989200 |
| 1403992800 |
| 1403996400 |
| 1404000000 |
| 1404003600 |
| 1404007200 |
| 1404010800 |
| 1404014400 |
| 1404018000 |
| 1404021600 |
| 1404025200 |
| 1404028800 |
| 1404032400 |
| 1404036000 |
| 1404039600 |
| 1404043200 |
| 1404046800 |
| 1404050400 |
| 1404054000 |
| 1404057600 |
+------------+

>>> SELECT count(1) AS total, hour_time FROM device2 where day_time =1403974800 GROUP BY hour_time ORDER BY hour_time
+------------+------------+
|   TOTAL    | HOUR_TIME  |
+------------+------------+
| 90         | 1403974800 |
| 73         | 1403978400 |
| 70         | 1403982000 |
| 66         | 1403985600 |
| 51         | 1403989200 |
| 39         | 1403992800 |
| 33         | 1403996400 |
| 60         | 1404000000 |
| 73         | 1404003600 |
| 77         | 1404007200 |
| 77         | 1404010800 |
| 97         | 1404014400 |
| 74         | 1404018000 |
| 92         | 1404021600 |
| 84         | 1404025200 |
| 83         | 1404028800 |
| 89         | 1404032400 |
| 93         | 1404036000 |
| 93         | 1404039600 |
| 99         | 1404043200 |
| 120        | 1404046800 |
| 113        | 1404050400 |
| 85         | 1404054000 |
| 80         | 1404057600 |
+------------+------------+



This kind of bug resolved in a lot of topic, i don't understand why it still apper:
http://mail-archives.apache.org/mod_mbox/phoenix-dev/201403.mbox/%3CJIRA.12700068.1394495218035.81228.1394954374732@arcas%3E
https://groups.google.com/forum/#!topic/phoenix-hbase-user/mZxSFxpqjS4
http://mail-archives.apache.org/mod_mbox/phoenix-user/201404.mbox/%3C1398727966.67421.YahooMailNeo@web165003.mail.bf1.yahoo.com%3E



--
This message was sent by Atlassian JIRA
(v6.2#6252)