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/21 08:32:24 UTC
kylin git commit: left join CI pass
Repository: kylin
Updated Branches:
refs/heads/KYLIN-2294 3e7e57be4 -> d8c8b6486
left join CI pass
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d8c8b648
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d8c8b648
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d8c8b648
Branch: refs/heads/KYLIN-2294
Commit: d8c8b6486decdcc5ce3bb28b7cf83e9d5fcba585
Parents: 3e7e57b
Author: Li Yang <li...@apache.org>
Authored: Wed Dec 21 16:32:17 2016 +0800
Committer: Li Yang <li...@apache.org>
Committed: Wed Dec 21 16:32:17 2016 +0800
----------------------------------------------------------------------
.../apache/kylin/query/ITKylinQueryTest.java | 22 +++++++-------------
.../resources/query/sql_derived/query12.sql | 2 +-
.../query/sql_intersect_count/query00.sql | 14 ++++++-------
.../test/resources/query/sql_limit/query01.sql | 10 ++++++---
4 files changed, 22 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/d8c8b648/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
index 9e94b75..227fa0a 100644
--- a/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/query/ITKylinQueryTest.java
@@ -149,7 +149,7 @@ public class ITKylinQueryTest extends KylinTestBase {
@Test
public void testSingleRunQuery() throws Exception {
- String queryFileName = getQueryFolderPrefix() + "src/test/resources/query/sql_distinct_precisely/query01.sql";
+ String queryFileName = getQueryFolderPrefix() + "src/test/resources/query/sql_limit/query01.sql";
File sqlFile = new File(queryFileName);
if (sqlFile.exists()) {
@@ -321,18 +321,10 @@ public class ITKylinQueryTest extends KylinTestBase {
@Test
public void testLimitEnabled() throws Exception {
- try {
- //other cubes have strange aggregation groups
- RemoveBlackoutRealizationsRule.whiteList.add("CUBE[name=test_kylin_cube_with_slr_empty]");
-
- List<File> sqlFiles = getFilesFromFolder(new File(getQueryFolderPrefix() + "src/test/resources/query/sql_limit"), ".sql");
- for (File sqlFile : sqlFiles) {
- runSQL(sqlFile, false, false);
- assertTrue(checkFinalPushDownLimit());
- }
-
- } finally {
- RemoveBlackoutRealizationsRule.whiteList.remove("CUBE[name=test_kylin_cube_with_slr_empty]");
+ List<File> sqlFiles = getFilesFromFolder(new File(getQueryFolderPrefix() + "src/test/resources/query/sql_limit"), ".sql");
+ for (File sqlFile : sqlFiles) {
+ runSQL(sqlFile, false, false);
+ assertTrue(checkFinalPushDownLimit());
}
}
@@ -378,7 +370,7 @@ public class ITKylinQueryTest extends KylinTestBase {
@Test
public void testSelectStarColumnCount() throws Exception {
- execAndCompColumnCount("select * from test_kylin_fact limit 10", 9);
- execAndCompColumnCount("select * from test_kylin_fact", 9);
+ execAndCompColumnCount("select * from test_kylin_fact limit 10", 12);
+ execAndCompColumnCount("select * from test_kylin_fact", 12);
}
}
http://git-wip-us.apache.org/repos/asf/kylin/blob/d8c8b648/kylin-it/src/test/resources/query/sql_derived/query12.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_derived/query12.sql b/kylin-it/src/test/resources/query/sql_derived/query12.sql
index 959a59c..f1f331c 100755
--- a/kylin-it/src/test/resources/query/sql_derived/query12.sql
+++ b/kylin-it/src/test/resources/query/sql_derived/query12.sql
@@ -18,7 +18,7 @@
select UPD_USER,count(1) as CNT
from TEST_KYLIN_FACT as TEST_KYLIN_FACT
-JOIN TEST_CATEGORY_GROUPINGS as TEST_CATEGORY_GROUPINGS
+inner join TEST_CATEGORY_GROUPINGS as 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
where UPD_USER not in ('USER_Y')
group by UPD_USER
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/kylin/blob/d8c8b648/kylin-it/src/test/resources/query/sql_intersect_count/query00.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_intersect_count/query00.sql b/kylin-it/src/test/resources/query/sql_intersect_count/query00.sql
index 15e274a..62d34da 100644
--- a/kylin-it/src/test/resources/query/sql_intersect_count/query00.sql
+++ b/kylin-it/src/test/resources/query/sql_intersect_count/query00.sql
@@ -18,13 +18,13 @@
select
week_beg_dt as week,
-intersect_count( seller_id, lstg_format_name, array['FP-GTC']) as a,
-intersect_count( seller_id, lstg_format_name, array['Auction']) as b,
-intersect_count( seller_id, lstg_format_name, array['Others']) as c,
-intersect_count( seller_id, lstg_format_name, array['FP-GTC', 'Auction']) as ab,
-intersect_count( seller_id, lstg_format_name, array['FP-GTC', 'Others']) as ac,
-intersect_count( seller_id, lstg_format_name, array['FP-GTC', 'Auction', 'Others']) as abc,
-count(distinct seller_id) as sellers,
+intersect_count( TEST_COUNT_DISTINCT_BITMAP, lstg_format_name, array['FP-GTC']) as a,
+intersect_count( TEST_COUNT_DISTINCT_BITMAP, lstg_format_name, array['Auction']) as b,
+intersect_count( TEST_COUNT_DISTINCT_BITMAP, lstg_format_name, array['Others']) as c,
+intersect_count( TEST_COUNT_DISTINCT_BITMAP, lstg_format_name, array['FP-GTC', 'Auction']) as ab,
+intersect_count( TEST_COUNT_DISTINCT_BITMAP, lstg_format_name, array['FP-GTC', 'Others']) as ac,
+intersect_count( TEST_COUNT_DISTINCT_BITMAP, lstg_format_name, array['FP-GTC', 'Auction', 'Others']) as abc,
+count(distinct TEST_COUNT_DISTINCT_BITMAP) as sellers,
count(*) as cnt
from test_kylin_fact left join edw.test_cal_dt on test_kylin_fact.cal_dt = edw.test_cal_dt.CAL_DT
where week_beg_dt in (DATE '2013-12-22', DATE '2012-06-23')
http://git-wip-us.apache.org/repos/asf/kylin/blob/d8c8b648/kylin-it/src/test/resources/query/sql_limit/query01.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_limit/query01.sql b/kylin-it/src/test/resources/query/sql_limit/query01.sql
index fca8175..0752165 100644
--- a/kylin-it/src/test/resources/query/sql_limit/query01.sql
+++ b/kylin-it/src/test/resources/query/sql_limit/query01.sql
@@ -16,6 +16,10 @@
-- limitations under the License.
--
-select * from test_kylin_fact
- where lstg_format_name='FP-GTC'
- limit 20
+select
+ *
+from test_kylin_fact
+ inner join TEST_CATEGORY_GROUPINGS as 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
+where lstg_format_name='FP-GTC'
+limit 20