You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/07/10 13:58:04 UTC
[jira] [Commented] (TAJO-934) Multiple DISTINCT returns null
grouping key value.
[ https://issues.apache.org/jira/browse/TAJO-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14057399#comment-14057399 ]
ASF GitHub Bot commented on TAJO-934:
-------------------------------------
GitHub user babokim opened a pull request:
https://github.com/apache/tajo/pull/63
TAJO-934: Multiple DISTINCT returns null grouping key value.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/babokim/tajo TAJO-934
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tajo/pull/63.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #63
----
commit 542fe82ed4ed1dc2764833ca81c0dc334b1e2c1c
Author: 김형준 <ba...@babokim-mbp.server.gruter.com>
Date: 2014-07-10T11:52:23Z
TAJO-934: Multiple DISTINCT returns null grouping key value.
commit ff1a5c7c503b569348bcd9b3fba5a196ead517ed
Author: 김형준 <ba...@babokim-mbp.server.gruter.com>
Date: 2014-07-10T11:55:52Z
TAJO-934: Multiple DISTINCT returns null grouping key value.
Remove debug comments
----
> Multiple DISTINCT returns null grouping key value.
> --------------------------------------------------
>
> Key: TAJO-934
> URL: https://issues.apache.org/jira/browse/TAJO-934
> Project: Tajo
> Issue Type: Bug
> Reporter: Hyoungjun Kim
> Assignee: Hyoungjun Kim
> Priority: Minor
>
> {noformat}
> default> select count * from table1;
> col1, col2, col3
> -------------------------
> a, b-1, null
> a, b-2, null
> a, b-2, null
> a, b-3, null
> a, b-3, null
> a, b-3, null
> default> select col1,
> count(distinct col2) as cnt1,
> count(distinct case when col3 is not null then col2 else null end) as cnt2
> from table1
> group by col1;
> col1,cnt1,cnt2
> -------------------------------
> a, 2, 1
> null, 1, 1
> {noformat}
> This query should return the below result.
> {noformat}
> col1,cnt1,cnt2
> -------------------------------
> a, 3, 1
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)