kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject kylin git commit: KYLIN-2217 fix NPE in FactDistinctColumnsReducer
Date Thu, 08 Dec 2016 03:15:21 GMT
Repository: kylin
Updated Branches:
  refs/heads/yang22 ae31b13e7 -> ac621fea4


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/ac621fea
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ac621fea
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ac621fea

Branch: refs/heads/yang22
Commit: ac621fea49fa220a3d14dc4600bcbd3961e7580f
Parents: ae31b13
Author: Li Yang <liyang@apache.org>
Authored: Thu Dec 8 11:14:31 2016 +0800
Committer: Li Yang <liyang@apache.org>
Committed: Thu Dec 8 11:15:15 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/ac621fea/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) {


Mime
View raw message