[ https://issues.apache.org/jira/browse/PHOENIX-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15195198#comment-15195198 ]
Joseph Sun commented on PHOENIX-2769: ------------------------------------- I'm using 4.6.0-HBase-1.1 and 4.7.0-HBase-1.1 that have same problem. > Order by desc return wrong results > ---------------------------------- > > Key: PHOENIX-2769 > URL: https://issues.apache.org/jira/browse/PHOENIX-2769 > Project: Phoenix > Issue Type: Bug > Reporter: Joseph Sun > Labels: test > > create table access_logs ( > event_time date not null, > uuid varchar(36) not null, > event_type varchar(32), > CONSTRAINT pk PRIMARY KEY (event_time,uuid) > ) VERSIONS=1,SALT_BUCKETS=6,IMMUTABLE_ROWS=true; > I insert 2,000,000 records to access_logs ,and event_time between 2016-01-06 > to 2016-03-15 . > I execute SQL. > >select event_time from access_logs order by event_time asc limit 10; > +--------------------------+ > | EVENT_TIME | > +--------------------------+ > | 2016-01-06 18:41:54.000 | > | 2016-01-06 19:56:46.000 | > | 2016-01-06 20:25:12.000 | > | 2016-01-06 20:41:37.000 | > | 2016-01-06 20:46:20.000 | > | 2016-01-06 20:53:10.000 | > | 2016-01-06 21:04:09.000 | > | 2016-01-07 01:22:57.000 | > | 2016-01-07 10:59:11.000 | > | 2016-01-07 12:52:56.000 | > +--------------------------+ > > > select event_time from access_logs order by event_time desc limit 10; > +--------------------------+ > | EVENT_TIME | > +--------------------------+ > | 2016-02-11 13:07:25.000 | > | 2016-02-11 13:07:24.000 | > | 2016-02-11 13:07:24.000 | > | 2016-02-11 13:07:23.000 | > | 2016-02-11 13:07:23.000 | > | 2016-02-11 13:07:22.000 | > | 2016-02-11 13:07:21.000 | > | 2016-02-11 13:07:21.000 | > | 2016-02-11 13:07:20.000 | > | 2016-02-11 13:07:20.000 | > > select event_time from access_logs where event_time>to_date('2016-02-11 > > 13:07:25') order by event_time desc limit 10; > +--------------------------+ > | EVENT_TIME | > +--------------------------+ > | 2016-02-25 18:34:17.000 | > | 2016-02-25 18:34:17.000 | > | 2016-02-25 18:34:16.000 | > | 2016-02-25 18:34:16.000 | > | 2016-02-25 18:34:15.000 | > | 2016-02-25 18:34:15.000 | > | 2016-02-25 18:34:14.000 | > | 2016-02-25 18:34:14.000 | > | 2016-02-25 18:34:14.000 | > | 2016-02-25 18:34:14.000 | > +--------------------------+ > Check the return results ,the 'order by event_time desc' is not return > correct results. -- This message was sent by Atlassian JIRA (v6.3.4#6332)