shaofengshi commented on a change in pull request #528: KYLIN-3883 Kylin 
supports column count aggregation
URL: https://github.com/apache/kylin/pull/528#discussion_r268026711
 
 

 ##########
 File path: 
core-cube/src/main/java/org/apache/kylin/cube/util/KeyValueBuilder.java
 ##########
 @@ -91,12 +91,18 @@ private String getCell(int i, String[] flatRow) {
         int colParamIdx = 0; // index among parameters of column type
         for (int i = 0; i < paramCount; i++, param = param.getNextParameter()) 
{
             String value;
-            if (function.isCount()) {
-                value = "1";
-            } else if (param.isColumnType()) {
+            if (param.isColumnType()) {
                 value = getCell(colIdxOnFlatTable[colParamIdx++], row);
+                if (function.isCount() && value == null) {
+                    value = "0";
 
 Review comment:
   Can 0 case be skipped directly, without adding value into the list?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to