[
https://issues.apache.org/jira/browse/PHOENIX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15341226#comment-15341226
]
James Taylor commented on PHOENIX-3014:
---------------------------------------
See comment here:
https://issues.apache.org/jira/browse/PHOENIX-3012?focusedCommentId=15341224&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15341224
> SELECT DISTINCT pk ORDER BY pk DESC gives the wrong results
> -----------------------------------------------------------
>
> Key: PHOENIX-3014
> URL: https://issues.apache.org/jira/browse/PHOENIX-3014
> Project: Phoenix
> Issue Type: Bug
> Reporter: Lars Hofhansl
>
> {code}
> create table T(pk1 varchar not null, pk2 varchar not null, constraint pk
> primary key(pk1, pk2)) SALT_BUCKETS=8;
> upsert into T values('1','1');
> upsert into T values('1','2');
> upsert into T values('2','1');
> select /*+ RANGE_SCAN */ distinct(pk1) from T order by pk1 desc;
> +------+
> | PK1 |
> +------+
> | 1 |
> | 2 |
> | 1 |
> select distinct(pk1) from T order by pk1 desc;
> +------+
> | PK1 |
> +------+
> | 1 |
> | 2 |
> | 1 |
> +------+
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)