You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/12/08 03:14:37 UTC

kylin git commit: KYLIN-2217 fix NPE in FactDistinctColumnsReducer

Repository: kylin
Updated Branches:
  refs/heads/master c0c56f4b6 -> 4c39fcb0e


KYLIN-2217 fix NPE in FactDistinctColumnsReducer


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4c39fcb0
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4c39fcb0
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4c39fcb0

Branch: refs/heads/master
Commit: 4c39fcb0eaab053d43554ac6add377343d585065
Parents: c0c56f4
Author: Li Yang <li...@apache.org>
Authored: Thu Dec 8 11:14:31 2016 +0800
Committer: Li Yang <li...@apache.org>
Committed: Thu Dec 8 11:14:31 2016 +0800

----------------------------------------------------------------------
 .../kylin/engine/mr/steps/FactDistinctColumnsReducer.java     | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/4c39fcb0/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
index a3e61a1..776d750 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
@@ -117,7 +117,6 @@ public class FactDistinctColumnsReducer extends KylinReducer<SelfDefineSortableK
             isPartitionCol = true;
             col = cubeDesc.getModel().getPartitionDesc().getPartitionDateColumnRef();
             if (col == null) {
-                isPartitionCol = false;
                 logger.info("Do not have partition col. This reducer will keep empty");
             }
             colValues = Lists.newLinkedList();
@@ -283,9 +282,9 @@ public class FactDistinctColumnsReducer extends KylinReducer<SelfDefineSortableK
                     cuboidHLLMap, samplingPercentage, mapperNumber, mapperOverlapRatio);
         } else if (isPartitionCol) {
             // partition col
-            if (col == null)
-                return;
-            outputPartitionInfo(context);
+            if (col != null) {
+                outputPartitionInfo(context);
+            }
         } else {
             // normal col
             if (isReducerLocalBuildDict) {