You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/08/10 04:13:44 UTC

[3/6] kylin git commit: KYLIN-1726 add partition column in fact distinct output

KYLIN-1726 add partition column in fact distinct output

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

Branch: refs/heads/master
Commit: 76d8672ca77ee662bece45e1b2428d42d9beccc6
Parents: 23407e3
Author: shaofengshi <sh...@apache.org>
Authored: Fri Jul 8 10:16:53 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Wed Aug 10 10:23:55 2016 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kylin/cube/CubeManager.java     | 8 ++++++++
 .../localmeta/table/DEFAULT.STREAMING_TABLE.json             | 1 -
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/76d8672c/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
index 0941d56..a456537 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/CubeManager.java
@@ -925,6 +925,14 @@ public class CubeManager implements IRealizationProvider {
                 factDictCols.add(col);
             }
         }
+
+        // add partition column in all case
+        if (cubeDesc.getModel().getPartitionDesc() != null) {
+            TblColRef partitionCol = cubeDesc.getModel().getPartitionDesc().getPartitionDateColumnRef();
+            if (factDictCols.contains(partitionCol) == false) {
+                factDictCols.add(partitionCol);
+            }
+        }
         return factDictCols;
     }
 }

http://git-wip-us.apache.org/repos/asf/kylin/blob/76d8672c/examples/test_case_data/localmeta/table/DEFAULT.STREAMING_TABLE.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/table/DEFAULT.STREAMING_TABLE.json b/examples/test_case_data/localmeta/table/DEFAULT.STREAMING_TABLE.json
index 5bcfa35..64f359b 100644
--- a/examples/test_case_data/localmeta/table/DEFAULT.STREAMING_TABLE.json
+++ b/examples/test_case_data/localmeta/table/DEFAULT.STREAMING_TABLE.json
@@ -1,5 +1,4 @@
 {
- 
   "uuid": "e286e39e-40d7-44c2-8fa2-41b365123987",
   "name": "STREAMING_TABLE",
   "columns": [