[ 
https://issues.apache.org/jira/browse/PHOENIX-5571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xinyi Yan resolved PHOENIX-5571.
--------------------------------
    Resolution: Cannot Reproduce

> Incorrect "IS NULL" handling
> ----------------------------
>
>                 Key: PHOENIX-5571
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5571
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.2
>            Reporter: Alex Batyrshin
>            Priority: Major
>
> {code:java}
> 0: jdbc:phoenix:> SELECT count(*) FROM STG.DAILY_DOCS_20190701;
> +-----------+
> | COUNT(1)  |
> +-----------+
> | 242624    |
> +-----------+ 
> 0: jdbc:phoenix:> SELECT count(*) FROM STG.DAILY_DOCS_20190701 where "ts" IS 
> NOT NULL;
> +-----------+
> | COUNT(1)  |
> +-----------+
> | 20099     |
> +-----------+{code}
>  
> This should means that count by "ts" IS NULL = 242624 - 20099 = 222525
> But Phoenix returns 0
> {code:java}
> 0: jdbc:phoenix:> SELECT count(*) FROM STG.DAILY_DOCS_20190701 where "ts" IS 
> NULL;
> +-----------+
> | COUNT(1)  |
> +-----------+
> | 0         |
> +-----------+ {code}
>  
> But if we add some additional AND condition we could get count:
> {code:java}
> 0: jdbc:phoenix:> SELECT count(*) FROM STG.DAILY_DOCS_20190701 where "ts" IS 
> NULL AND "did" is not null;
> +-----------+
> | COUNT(1)  |
> +-----------+
> | 222525    |
> +-----------+ {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to