phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-2064) ARRAY constructor doesn't work when used in COUNT DISTINCT
Date Fri, 03 Jul 2015 08:06:04 GMT


James Taylor commented on PHOENIX-2064:

Add a return true to the if statement at the top of evaluate method:
if (position == elements.length) {
    ptr.set(valuePtr.get(), valuePtr.getOffset(), valuePtr.getLength());
    return true;
Also, in init(), do valuePtr.set(ByteUtil.EMPTY_BYTE_ARRAY);

Otherwise, I'm not sure - I'd need to debug it. The idea is to return the cached value, but
we'd only do it when position has been initialized to not be -1 in the reset call. This is
a kind of partial evaluation mode that executes on the server-side during filtering.

> ARRAY constructor doesn't work when used in COUNT DISTINCT
> ----------------------------------------------------------
>                 Key: PHOENIX-2064
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Dumindu Buddhika
>         Attachments: PHOENIX-2064-v2.patch, PHOENIX-2064.patch
> As a workaround for PHOENIX-2062, I tried the following query:
> {code}
> SELECT COUNT(DISTINCT ARRAY[a.col1, b.col2]) ...
> {code}
> However, this always returns the full number of rows which is wrong.

This message was sent by Atlassian JIRA

View raw message