Kylin can’t support count(not null) directly, but there’s workaround. Let’s say you have column ‘col1’, and want calculate count(col1 not null), you should create a new column ‘col2’, which col2 = if(col1 is not null, 1, 0), and then you can define a measure sum(col2) in kylin.
> 在 2016年8月17日,15:17,Ding Dinghua <[email protected]> 写道: > > ping... > > 2016-08-16 21:00 GMT+08:00 Ding Dinghua <[email protected]>: >> Hi: >> Does kylin support count(a particular column) now? >> that is, count will skip rows which the particular column value is null. >> In our test, I found it is not supported currently(kylin-1.5.2), >> and I found that agg->aggCalls->arglist is null in >> OLAPAggregateRule::convert when I submmit sql like: >> select dt, count(xxx) from test_table group by dt; >> The information about the particular column is lost in kylin, so I >> want to know why? >> Since I found count(xxx) is support in calcite: >> https://calcite.apache.org/docs/reference.html >> >> -- >> Ding Dinghua > > > > -- > Ding Dinghua
