kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billy...@apache.org
Subject [2/5] kylin git commit: minor, sub_query/query02.sql fix CI
Date Sun, 18 Dec 2016 06:14:06 GMT
minor, sub_query/query02.sql fix CI


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

Branch: refs/heads/KYLIN-2293
Commit: f2377db9ff2687098c0bd8a805449547b7dcd436
Parents: 911bdd0
Author: Li Yang <liyang@apache.org>
Authored: Fri Dec 16 15:53:30 2016 +0800
Committer: Li Yang <liyang@apache.org>
Committed: Fri Dec 16 15:53:30 2016 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/dimension/DimensionEncodingFactory.java | 2 +-
 .../java/org/apache/kylin/metadata/model/DataModelDesc.java  | 4 ++--
 kylin-it/src/test/resources/query/sql_subquery/query02.sql   | 8 ++++++--
 3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f2377db9/core-metadata/src/main/java/org/apache/kylin/dimension/DimensionEncodingFactory.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/dimension/DimensionEncodingFactory.java
b/core-metadata/src/main/java/org/apache/kylin/dimension/DimensionEncodingFactory.java
index 4954ead..3eddba7 100644
--- a/core-metadata/src/main/java/org/apache/kylin/dimension/DimensionEncodingFactory.java
+++ b/core-metadata/src/main/java/org/apache/kylin/dimension/DimensionEncodingFactory.java
@@ -71,7 +71,7 @@ public abstract class DimensionEncodingFactory {
         if (factoryMap == null)
             initFactoryMap();
 
-        Map<String, Integer> result = Maps.newHashMap();
+        Map<String, Integer> result = Maps.newTreeMap();
         for (Pair<String, Integer> p : factoryMap.keySet()) {
             if (result.containsKey(p.getFirst())) {
                 if (result.get(p.getFirst()) > p.getSecond()) {

http://git-wip-us.apache.org/repos/asf/kylin/blob/f2377db9/core-metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
b/core-metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
index 0b494e3..571b196 100644
--- a/core-metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
+++ b/core-metadata/src/main/java/org/apache/kylin/metadata/model/DataModelDesc.java
@@ -393,7 +393,7 @@ public class DataModelDesc extends RootPersistentEntity {
                     col = findColumn(pks[i]);
                 }
                 if (col == null || col.getTableRef().equals(dimTable) == false) {
-                    throw new IllegalStateException("Can't find column " + pks[i] + " in
table " + dimTable.getTableIdentity());
+                    throw new IllegalStateException("Can't find PK column " + pks[i] + "
in table " + dimTable);
                 }
                 pks[i] = col.getIdentity();
                 pkCols[i] = col;
@@ -406,7 +406,7 @@ public class DataModelDesc extends RootPersistentEntity {
             for (int i = 0; i < fks.length; i++) {
                 TblColRef col = findColumn(fks[i]);
                 if (col == null) {
-                    throw new IllegalStateException("Can't find column " + fks[i] + " in
table " + this.getRootFactTable());
+                    throw new IllegalStateException("Can't find FK column " + fks[i]);
                 }
                 fks[i] = col.getIdentity();
                 fkCols[i] = col;

http://git-wip-us.apache.org/repos/asf/kylin/blob/f2377db9/kylin-it/src/test/resources/query/sql_subquery/query02.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_subquery/query02.sql b/kylin-it/src/test/resources/query/sql_subquery/query02.sql
index e6751b7..b0dcf73 100644
--- a/kylin-it/src/test/resources/query/sql_subquery/query02.sql
+++ b/kylin-it/src/test/resources/query/sql_subquery/query02.sql
@@ -25,7 +25,11 @@ FROM
     test_cal_dt.week_beg_dt
     ,test_kylin_fact.price
   from test_kylin_fact 
-  inner join edw.test_cal_dt as test_cal_dt
-    on test_kylin_fact.cal_dt = test_cal_dt.cal_dt
+    inner JOIN edw.test_cal_dt as test_cal_dt
+      ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt
+    inner JOIN test_category_groupings
+      ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id
= test_category_groupings.site_id
+    inner JOIN edw.test_sites as test_sites
+      ON test_kylin_fact.lstg_site_id = test_sites.site_id  inner join edw.test_cal_dt as
test_cal_dt
 ) t
 group by week_beg_dt 


Mime
View raw message