phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-3014) SELECT DISTINCT pk ORDER BY pk DESC gives the wrong results with salted tables
Date Tue, 21 Jun 2016 23:13:58 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lars Hofhansl resolved PHOENIX-3014.
------------------------------------
    Resolution: Fixed

Pushed to master and 4.x*

Credit goes to [~giacomotaylor] for identifying the fix, so I left it assigned to James.

> SELECT DISTINCT pk ORDER BY pk DESC gives the wrong results with salted tables
> ------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3014
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3014
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: James Taylor
>             Fix For: 4.8.0
>
>         Attachments: 3014-v2.txt, PHOENIX-3014_untested.patch
>
>
> {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)

Mime
View raw message