[
https://issues.apache.org/jira/browse/PHOENIX-3866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Taylor updated PHOENIX-3866:
----------------------------------
Attachment: PHOENIX-3866_v2.patch
Slightly modified patch to fix test failures. We still need to project the
empty key value in the case of a grouped aggregation because null is a valid
group by key. We also project the empty key value family if we're doing a first
key only filter as otherwise we mistakenly select local index rows.
> COUNT(col) should scan along required column families only
> ----------------------------------------------------------
>
> Key: PHOENIX-3866
> URL: https://issues.apache.org/jira/browse/PHOENIX-3866
> Project: Phoenix
> Issue Type: Bug
> Reporter: Lars Hofhansl
> Assignee: James Taylor
> Priority: Minor
> Fix For: 4.11.0
>
> Attachments: PHOENIX-3866.patch, PHOENIX-3866_v2.patch
>
>
> These two should be equivalent:
> {code}
> 0: jdbc:phoenix:localhost> select count(B.COLB) from test;
> +----------------+
> | COUNT(B.COLB) |
> +----------------+
> | 10054 |
> +----------------+
> 1 row selected (9.446 seconds)
> 0: jdbc:phoenix:localhost> select count(B.COLB) from test where B.COLB is not
> null;
> +----------------+
> | COUNT(B.COLB) |
> +----------------+
> | 10054 |
> +----------------+
> 1 row selected (0.028 seconds)
> {code}
> Clearly the plain COUNT is doing unnecessary work.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)