You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shaofeng SHI (JIRA)" <ji...@apache.org> on 2016/11/03 06:18:58 UTC

[jira] [Comment Edited] (KYLIN-2049) Incorrect AVG result with NULL measure values

    [ https://issues.apache.org/jira/browse/KYLIN-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15631755#comment-15631755 ] 

Shaofeng SHI edited comment on KYLIN-2049 at 11/3/16 6:18 AM:
--------------------------------------------------------------

As I know so far the "COUNT" in Kylin doesn't check whether the value is NULL or not; so "COUNT(COL_A)" will get the same result as "COUNT(*)", in Hive they are different. 

Kylin should allow user to select a column when defining the COUNT measure.


was (Author: shaofengshi):
As I know so far the "COUNT" in Kylin doesn't check whether the value is NULL or not; so "COUNT(COL_A)" will get the same result as "COUNT(*)", in Hive they are different. 

> Incorrect AVG result with NULL measure values
> ---------------------------------------------
>
>                 Key: KYLIN-2049
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2049
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: liyang
>
> Thanks to Itay. From - http://stackoverflow.com/questions/39664918/apache-kylin-null-value-measures-become-zeros
> I'm trying to build a Kylin Cube that will get me the Average of a SmallInt nullable column Col1. I expect any null value to not be counted towards this average. When I work on my table in Hive this is exactly the result that I'm getting when applying the AVG function. However when I build the cube in Kylin on top of this table all the null values in my measurements columns are becoming zeros and then counted towards the calculation of the AVG. Is there a way to force Kylin to treat nulls as nulls?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)