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 2017/12/03 06:40:29 UTC

[1/2] kylin git commit: KYLIN-2974 zero joint group can lead to query error

Repository: kylin
Updated Branches:
  refs/heads/tmp a184c51de -> 43d02f473


KYLIN-2974 zero joint group can lead to query error

Signed-off-by: Li Yang <li...@apache.org>


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

Branch: refs/heads/tmp
Commit: f5e22801704b31820f08ca1cae74ab685ec42ec0
Parents: a184c51
Author: yanghao3 <ya...@xiaomi.com>
Authored: Fri Oct 27 19:49:13 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Sun Dec 3 14:22:17 2017 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/cube/model/AggregationGroup.java     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f5e22801/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java b/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
index d976c79..a26a4dd 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java
@@ -410,9 +410,13 @@ public class AggregationGroup implements Serializable {
                     }
                 }
             }
-
-            cuboidID = cuboidID | Collections.min(getJoints(), Cuboid.cuboidSelectComparator);
-            Preconditions.checkState(isOnTree(cuboidID));
+            if (getJoints().size() > 0) {
+                cuboidID = cuboidID | Collections.min(getJoints(), Cuboid.cuboidSelectComparator);
+            }
+            if (!isOnTree(cuboidID)) {
+                // kylin.cube.aggrgroup.is-mandatory-only-valid can be false
+                return null;
+            }
         }
         return cuboidID;
     }


[2/2] kylin git commit: KYLIN-3077 create table EDW.TEST_SELLER_TYPE_DIM_TABLE during CI prepare data

Posted by li...@apache.org.
KYLIN-3077 create table EDW.TEST_SELLER_TYPE_DIM_TABLE during CI prepare data


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

Branch: refs/heads/tmp
Commit: 43d02f4730f17bde981582d5a94591ca9f2c1f22
Parents: f5e2280
Author: Li Yang <li...@apache.org>
Authored: Sun Dec 3 14:40:14 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Sun Dec 3 14:40:14 2017 +0800

----------------------------------------------------------------------
 assembly/src/test/java/org/apache/kylin/job/DeployUtil.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/43d02f47/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java b/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java
index 5866c09..8f6c7dc 100644
--- a/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java
+++ b/assembly/src/test/java/org/apache/kylin/job/DeployUtil.java
@@ -190,6 +190,9 @@ public class DeployUtil {
     }
 
     private static void deployTables(String modelName) throws Exception {
+        // the special VIEW_SELLER_TYPE_DIM is a wrapper of TABLE_SELLER_TYPE_DIM_TABLE
+        final String VIEW_SELLER_TYPE_DIM = "EDW.TEST_SELLER_TYPE_DIM";
+        final String TABLE_SELLER_TYPE_DIM_TABLE = "EDW.TEST_SELLER_TYPE_DIM_TABLE";
 
         TableMetadataManager metaMgr = TableMetadataManager.getInstance(config());
         DataModelManager modelMgr = DataModelManager.getInstance(config());
@@ -205,6 +208,8 @@ public class DeployUtil {
                 TABLE_NAMES.add(identity);
             }
         }
+        TABLE_NAMES.add(TABLE_SELLER_TYPE_DIM_TABLE); // the wrapper view VIEW_SELLER_TYPE_DIM need this table
+        
         // scp data files, use the data from hbase, instead of local files
         File tempDir = Files.createTempDir();
         String tempDirAbsPath = tempDir.getAbsolutePath();
@@ -239,12 +244,11 @@ public class DeployUtil {
         // load data to hive tables
         // LOAD DATA LOCAL INPATH 'filepath' [OVERWRITE] INTO TABLE tablename
         for (String tablename : TABLE_NAMES) {
+            logger.info(String.format("load data into %s", tablename));
             sampleDataDeployer.loadSampleData(tablename, tempDirAbsPath);
         }
         
         //TODO create the view automatically here
-        final String VIEW_SELLER_TYPE_DIM = "edw.test_seller_type_dim";
-        final String TABLE_SELLER_TYPE_DIM_TABLE = "edw.test_seller_type_dim_table";
         sampleDataDeployer.createWrapperView(TABLE_SELLER_TYPE_DIM_TABLE, VIEW_SELLER_TYPE_DIM);
     }
 }