You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "JieChen (JIRA)" <ji...@apache.org> on 2018/08/01 01:21:00 UTC
[jira] [Created] (PHOENIX-4830) order by primary key desc return
wrong results
JieChen created PHOENIX-4830:
--------------------------------
Summary: order by primary key desc return wrong results
Key: PHOENIX-4830
URL: https://issues.apache.org/jira/browse/PHOENIX-4830
Project: Phoenix
Issue Type: Bug
Affects Versions: 4.14.0
Environment: phoenix-4.14-hbase-1.2
Reporter: JieChen
{code:java}
0: jdbc:phoenix:localhost> create table test(id bigint not null primary key, a bigint);
No rows affected (1.242 seconds)
0: jdbc:phoenix:localhost> upsert into test values(1,11);
1 row affected (0.01 seconds)
0: jdbc:phoenix:localhost> upsert into test values(2,22);
1 row affected (0.007 seconds)
0: jdbc:phoenix:localhost> upsert into test values(3,33);
1 row affected (0.005 seconds)
0: jdbc:phoenix:localhost> select * from test;
+-----+-----+
| ID | A |
+-----+-----+
| 1 | 11 |
| 2 | 22 |
| 3 | 33 |
+-----+-----+
3 rows selected (0.015 seconds)
0: jdbc:phoenix:localhost> select * from test order by id desc limit 2 offset 0;
+-----+-----+
| ID | A |
+-----+-----+
| 3 | 33 |
| 2 | 22 |
+-----+-----+
2 rows selected (0.018 seconds)
0: jdbc:phoenix:localhost> select * from test where id in (select id from test ) order by id desc limit 2 offset 0;
+-----+-----+
| ID | A |
+-----+-----+
| 2 | 22 |
| 1 | 11 |
+-----+-----+
wrong results.
{code}
there may be some errors. ScanUtil.setupReverseScan code.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)