[ https://issues.apache.org/jira/browse/KYLIN-2948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16213915#comment-16213915 ]
albertoramon commented on KYLIN-2948: ------------------------------------- For topn solved in[Kylin 2152|https://issues.apache.org/jira/browse/KYLIN-2152] v1.6.0 For count distinct [Kylin 2383|https://issues.apache.org/jira/browse/KYLIN-2383] v2.0.0 [Workarround|http://mail-archives.apache.org/mod_mbox/kylin-dev/201608.mbox/%3C4F59262A-534F-42FB-9702-C3E320F6822C%40gmail.com%3E] or define column as not null in hive :) > Count a column returns the same result as count(*) even if this column has > NULL > ------------------------------------------------------------------------------- > > Key: KYLIN-2948 > URL: https://issues.apache.org/jira/browse/KYLIN-2948 > Project: Kylin > Issue Type: Bug > Affects Versions: v2.1.0 > Environment: CentOS 7 > Reporter: DeXin > Priority: Critical > > When we want to count a column(with same NULL value), there is different > result from kylin and hive SQL. Is there a way to exclude NULL value in count > measure calculation for a particular column? > Here is the example: > 1. Here is source data: > Date ID > 2017-10-10 dfe343ddfe3f5 > 2017-10-11 fer234d656dff > 2017-10-11 NULL > 2017-10-12 jui6jnc3ncce3 > 2. run SQL in Hive: > select Date, count(*), count(ID) from table group by Date; > 2017-10-10 1 1 > 2017-10-11 2 1 > 2017-10-12 1 1 > 3. run same SQL in Kylin: > select Date, count(*), count(ID) from table group by Date; > 2017-10-10 1 1 > 2017-10-11 2 2 > 2017-10-12 1 1 -- This message was sent by Atlassian JIRA (v6.4.14#64029)