You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Maryann Xue (JIRA)" <ji...@apache.org> on 2016/01/26 03:26:39 UTC
[jira] [Updated] (PHOENIX-2279) Error result when there are both
GROUP-BY and LIMIT operation on derived table
[ https://issues.apache.org/jira/browse/PHOENIX-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maryann Xue updated PHOENIX-2279:
---------------------------------
Summary: Error result when there are both GROUP-BY and LIMIT operation on derived table (was: Error result when there are both `group by` and `limit `operation on derived table)
> Error result when there are both GROUP-BY and LIMIT operation on derived table
> ------------------------------------------------------------------------------
>
> Key: PHOENIX-2279
> URL: https://issues.apache.org/jira/browse/PHOENIX-2279
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.5.1
> Reporter: Yi Tian
> Assignee: Maryann Xue
> Fix For: 4.8.0
>
>
> Here is how to reproduce this issue:
> {quote}
> 0: jdbc:phoenix:localhost> create table test2 (a varchar(10) CONSTRAINT PK PRIMARY KEY (a)) VERSIONS=1;
> No rows affected (0.259 seconds)
> 0: jdbc:phoenix:localhost> create table test1 (a varchar(10) CONSTRAINT PK PRIMARY KEY (a)) VERSIONS=1;
> No rows affected (0.258 seconds)
> 0: jdbc:phoenix:localhost> upsert into test2 values('a1');
> 1 row affected (0.014 seconds)
> 0: jdbc:phoenix:localhost> upsert into test2 values('a2');
> 1 row affected (0.004 seconds)
> 0: jdbc:phoenix:localhost> upsert into test1 values('a1');
> 1 row affected (0.013 seconds)
> 0: jdbc:phoenix:localhost> upsert into test1 values('a2');
> 1 row affected (0.005 seconds)
> 0: jdbc:phoenix:localhost> select a,count(1) from (select a from test1 union all select a from test2) group by a limit 2;
> +-------+----------+
> | A | COUNT(1) |
> +-------+----------+
> | a1 | 2 |
> +-------+----------+
> 1 row selected (0.017 seconds)
> {quote}
> The result should be:
> +-------+----------+
> | A | COUNT(1) |
> +-------+----------+
> | a1 | 2 |
> | a2 | 2 |
> +-------+----------+
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)