[
https://issues.apache.org/jira/browse/PHOENIX-2063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14618100#comment-14618100
]
James Taylor commented on PHOENIX-2063:
---------------------------------------
Maybe we need to add a call to reset() in ServerAggregators here like this? Or
is this happening on the client side?
{code}
@Override
public void aggregate(Aggregator[] aggregators, Tuple result) {
for (int i = 0; i < expressions.length; i++) {
if (expressions[i].evaluate(result, ptr) && ptr.getLength() != 0) {
aggregators[i].aggregate(result, ptr);
}
expressions[i].reset();
}
}
{code}
If server-side, would you mind trying this to see if it helps?
> Row value constructor doesn't work when used in COUNT DISTINCT
> --------------------------------------------------------------
>
> Key: PHOENIX-2063
> URL: https://issues.apache.org/jira/browse/PHOENIX-2063
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Assignee: Dumindu Buddhika
> Attachments: PHOENIX-2063-v1.patch
>
>
> As a workaround for PHOENIX-2062, I tried the following query:
> {code}
> SELECT COUNT(DISTINCT (a.col1, b.col2)) ...
> {code}
> However, this always returns 1 as the COUNT DISTINCT which is wrong.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)