[
https://issues.apache.org/jira/browse/PHOENIX-3054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15453674#comment-15453674
]
James Taylor commented on PHOENIX-3054:
---------------------------------------
[[email protected]] - would you have some cycles for this one? Should be
simple, in theory. I suspect when we have a WHERE clause that we know won't
return rows, we're returning an empty iterator. The COUNT( * ) query is a bit
unusual in that it should return 0 instead. Is that correct, [~julianhyde]?
What if there's other SELECT expresssions, though?
{code}
select count( * ), 123 from t;
select count( * ), sum(foo) from t;
{code}
> Counting zero null rows returns an empty result set
> ---------------------------------------------------
>
> Key: PHOENIX-3054
> URL: https://issues.apache.org/jira/browse/PHOENIX-3054
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.7.0
> Reporter: Kevin Liew
> Priority: Minor
> Labels: count, count(*), null, sql
> Fix For: 4.8.1
>
>
> Execute the following query on a table with zero null cells.
> {code}
> select count(*) from table where column1 = null
> {code}
> The result set should consist of one cell with the value `0` but the result
> set is empty.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)