phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chenglei (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (PHOENIX-5217) Incorrect result for COUNT DISTINCT ... limit ...
Date Sat, 30 Mar 2019 02:58:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16805593#comment-16805593
] 

chenglei edited comment on PHOENIX-5217 at 3/30/19 2:57 AM:
------------------------------------------------------------

[~fengchen8086], It is indeed a bug introduced by PHOENIX-3501, I will make a patch for it.

A  group by pk1 is added for {{}} because we want to add a {{DistinctPrefixFilter}} to optimize
count(distinct)


was (Author: comnetwork):
[~fengchen8086], It is indeed a bug introduced by PHOENIX-3501, I will make a patch for it.

> Incorrect result for COUNT DISTINCT ... limit ...
> -------------------------------------------------
>
>                 Key: PHOENIX-5217
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5217
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.1
>         Environment: 4.14.1: incorrect
> 4.6: correct.
>  
>            Reporter: Chen Feng
>            Priority: Critical
>
> For table t1(pk1, col1, CONSTRAINT(pk1))
> upsert into "t1" values (1, 1);
>  upsert into "t1" values (2, 2);
> sql A: select count("pk1") from "t1" limit 1, return 2 [correct]
> sql B: select count(disctinct("pk1")) from "t1" limit 1, return 1 [incorrect]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message