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/20 13:51:48 UTC
kylin git commit: refactor some queries, missing EXTENDED queries
Repository: kylin
Updated Branches:
refs/heads/KYLIN-2294 8787bb56a -> 7f707852c
refactor some queries, missing EXTENDED queries
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7f707852
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7f707852
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7f707852
Branch: refs/heads/KYLIN-2294
Commit: 7f707852c4d9b60d0b36132e0cef39b4b231711a
Parents: 8787bb5
Author: Yang Li <li...@apache.org>
Authored: Tue Dec 20 21:51:15 2016 +0800
Committer: Yang Li <li...@apache.org>
Committed: Tue Dec 20 21:51:23 2016 +0800
----------------------------------------------------------------------
.../localmeta/cube_desc/ci_inner_join_cube.json | 6 ++---
.../localmeta/cube_desc/ci_left_join_cube.json | 6 ++---
.../query/sql_distinct_precisely/query00.sql | 2 +-
.../query/sql_distinct_precisely/query01.sql | 2 +-
.../query/sql_distinct_precisely/query02.sql | 2 +-
.../query/sql_distinct_precisely/query03.sql | 2 +-
.../query/sql_distinct_precisely/query04.sql | 2 +-
.../test/resources/query/sql_raw/query04.sql | 2 +-
.../test/resources/query/sql_raw/query06.sql | 2 +-
.../test/resources/query/sql_raw/query23.sql | 2 +-
.../test/resources/query/sql_raw/query24.sql | 24 --------------------
.../query/sql_raw/query26.sql.disabled | 24 --------------------
12 files changed, 14 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/examples/test_case_data/localmeta/cube_desc/ci_inner_join_cube.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/ci_inner_join_cube.json b/examples/test_case_data/localmeta/cube_desc/ci_inner_join_cube.json
index 3df5993..48a051d 100644
--- a/examples/test_case_data/localmeta/cube_desc/ci_inner_join_cube.json
+++ b/examples/test_case_data/localmeta/cube_desc/ci_inner_join_cube.json
@@ -187,12 +187,12 @@
"returntype" : "raw"
}
}, {
- "name" : "ITEM_COUNT_RAW",
+ "name" : "CAL_DT_RAW",
"function" : {
"expression" : "RAW",
"parameter" : {
"type" : "column",
- "value" : "ITEM_COUNT"
+ "value" : "CAL_DT"
},
"returntype" : "raw"
}
@@ -254,7 +254,7 @@
"name" : "f3",
"columns" : [ {
"qualifier" : "m",
- "measure_refs" : [ "TEST_EXTENDED_COLUMN", "TRANS_ID_RAW", "PRICE_RAW", "ITEM_COUNT_RAW" ]
+ "measure_refs" : [ "TEST_EXTENDED_COLUMN", "TRANS_ID_RAW", "PRICE_RAW", "CAL_DT_RAW" ]
} ]
} ]
},
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/examples/test_case_data/localmeta/cube_desc/ci_left_join_cube.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/ci_left_join_cube.json b/examples/test_case_data/localmeta/cube_desc/ci_left_join_cube.json
index b9647ea..df370f7 100644
--- a/examples/test_case_data/localmeta/cube_desc/ci_left_join_cube.json
+++ b/examples/test_case_data/localmeta/cube_desc/ci_left_join_cube.json
@@ -187,12 +187,12 @@
"returntype" : "raw"
}
}, {
- "name" : "ITEM_COUNT_RAW",
+ "name" : "CAL_DT_RAW",
"function" : {
"expression" : "RAW",
"parameter" : {
"type" : "column",
- "value" : "ITEM_COUNT"
+ "value" : "CAL_DT"
},
"returntype" : "raw"
}
@@ -254,7 +254,7 @@
"name" : "f3",
"columns" : [ {
"qualifier" : "m",
- "measure_refs" : [ "TEST_EXTENDED_COLUMN", "TRANS_ID_RAW", "PRICE_RAW", "ITEM_COUNT_RAW" ]
+ "measure_refs" : [ "TEST_EXTENDED_COLUMN", "TRANS_ID_RAW", "PRICE_RAW", "CAL_DT_RAW" ]
} ]
} ]
},
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_distinct_precisely/query00.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_distinct_precisely/query00.sql b/kylin-it/src/test/resources/query/sql_distinct_precisely/query00.sql
index 0c163a6..762ea38 100644
--- a/kylin-it/src/test/resources/query/sql_distinct_precisely/query00.sql
+++ b/kylin-it/src/test/resources/query/sql_distinct_precisely/query00.sql
@@ -19,6 +19,6 @@
select lstg_format_name, cal_dt,
sum(price) as GMV,
count(1) as TRANS_CNT,
- count(distinct user_id) as user_count
+ count(distinct TEST_COUNT_DISTINCT_BITMAP) as user_count
from test_kylin_fact
group by lstg_format_name, cal_dt
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_distinct_precisely/query01.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_distinct_precisely/query01.sql b/kylin-it/src/test/resources/query/sql_distinct_precisely/query01.sql
index 62142a2..b05f022 100644
--- a/kylin-it/src/test/resources/query/sql_distinct_precisely/query01.sql
+++ b/kylin-it/src/test/resources/query/sql_distinct_precisely/query01.sql
@@ -19,7 +19,7 @@
select lstg_format_name,
sum(price) as GMV,
count(1) as TRANS_CNT,
- count(distinct user_id) as user_count
+ count(distinct TEST_COUNT_DISTINCT_BITMAP) as user_count
from test_kylin_fact
where lstg_format_name='FP-GTC'
group by lstg_format_name
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_distinct_precisely/query02.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_distinct_precisely/query02.sql b/kylin-it/src/test/resources/query/sql_distinct_precisely/query02.sql
index 88ce532..11418d1 100644
--- a/kylin-it/src/test/resources/query/sql_distinct_precisely/query02.sql
+++ b/kylin-it/src/test/resources/query/sql_distinct_precisely/query02.sql
@@ -19,7 +19,7 @@
select lstg_format_name,
sum(price) as GMV,
count(1) as TRANS_CNT,
- count(distinct user_id) as user_count
+ count(distinct TEST_COUNT_DISTINCT_BITMAP) as user_count
from test_kylin_fact
where lstg_format_name='FP-GTC'
group by lstg_format_name
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_distinct_precisely/query03.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_distinct_precisely/query03.sql b/kylin-it/src/test/resources/query/sql_distinct_precisely/query03.sql
index 7f739e7..2be8963 100644
--- a/kylin-it/src/test/resources/query/sql_distinct_precisely/query03.sql
+++ b/kylin-it/src/test/resources/query/sql_distinct_precisely/query03.sql
@@ -18,7 +18,7 @@
select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV
, count(1) as TRANS_CNT
- , count(distinct user_id) as user_count
+ , count(distinct TEST_COUNT_DISTINCT_BITMAP) as user_count
, count(distinct site_name) as site_count
from test_kylin_fact
inner JOIN edw.test_cal_dt as test_cal_dt
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_distinct_precisely/query04.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_distinct_precisely/query04.sql b/kylin-it/src/test/resources/query/sql_distinct_precisely/query04.sql
index 13de5a7..7306824 100644
--- a/kylin-it/src/test/resources/query/sql_distinct_precisely/query04.sql
+++ b/kylin-it/src/test/resources/query/sql_distinct_precisely/query04.sql
@@ -18,7 +18,7 @@
select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV
, count(1) as TRANS_CNT
- , count(distinct user_id) as user_count
+ , count(distinct TEST_COUNT_DISTINCT_BITMAP) as user_count
, count(distinct site_name) as site_count
from test_kylin_fact
inner JOIN edw.test_cal_dt as test_cal_dt
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_raw/query04.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_raw/query04.sql b/kylin-it/src/test/resources/query/sql_raw/query04.sql
index 2dc7d25..22f6ac2 100644
--- a/kylin-it/src/test/resources/query/sql_raw/query04.sql
+++ b/kylin-it/src/test/resources/query/sql_raw/query04.sql
@@ -16,4 +16,4 @@
-- limitations under the License.
--
-select CAL_DT,LSTG_FORMAT_NAME from test_kylin_fact where LSTG_FORMAT_NAME = 'ABIN'
+select CAL_DT,LSTG_FORMAT_NAME,PRICE,TRANS_ID from test_kylin_fact where LSTG_FORMAT_NAME = 'ABIN'
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_raw/query06.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_raw/query06.sql b/kylin-it/src/test/resources/query/sql_raw/query06.sql
index 0701c1f..7080ab5 100644
--- a/kylin-it/src/test/resources/query/sql_raw/query06.sql
+++ b/kylin-it/src/test/resources/query/sql_raw/query06.sql
@@ -16,4 +16,4 @@
-- limitations under the License.
--
-select LSTG_FORMAT_NAME,LSTG_SITE_ID,SLR_SEGMENT_CD,CAL_DT,LEAF_CATEG_ID,PRICE from test_kylin_fact
\ No newline at end of file
+select LSTG_FORMAT_NAME,LSTG_SITE_ID,SLR_SEGMENT_CD,CAL_DT,LEAF_CATEG_ID,PRICE,TRANS_ID from test_kylin_fact
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_raw/query23.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_raw/query23.sql b/kylin-it/src/test/resources/query/sql_raw/query23.sql
index 89d61db..5be4ad0 100644
--- a/kylin-it/src/test/resources/query/sql_raw/query23.sql
+++ b/kylin-it/src/test/resources/query/sql_raw/query23.sql
@@ -16,7 +16,7 @@
-- limitations under the License.
--
-select test_kylin_fact.CAL_DT,LSTG_FORMAT_NAME,PRICE from test_kylin_fact inner JOIN edw.test_cal_dt as test_cal_dt
+select test_kylin_fact.CAL_DT,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 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
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_raw/query24.sql
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_raw/query24.sql b/kylin-it/src/test/resources/query/sql_raw/query24.sql
deleted file mode 100644
index 46c7329..0000000
--- a/kylin-it/src/test/resources/query/sql_raw/query24.sql
+++ /dev/null
@@ -1,24 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select test_kylin_fact.CAL_DT,LSTG_FORMAT_NAME 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 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 where LSTG_FORMAT_NAME = 'ABIN'
http://git-wip-us.apache.org/repos/asf/kylin/blob/7f707852/kylin-it/src/test/resources/query/sql_raw/query26.sql.disabled
----------------------------------------------------------------------
diff --git a/kylin-it/src/test/resources/query/sql_raw/query26.sql.disabled b/kylin-it/src/test/resources/query/sql_raw/query26.sql.disabled
deleted file mode 100644
index cab92d0..0000000
--- a/kylin-it/src/test/resources/query/sql_raw/query26.sql.disabled
+++ /dev/null
@@ -1,24 +0,0 @@
---
--- Licensed to the Apache Software Foundation (ASF) under one
--- or more contributor license agreements. See the NOTICE file
--- distributed with this work for additional information
--- regarding copyright ownership. The ASF licenses this file
--- to you under the Apache License, Version 2.0 (the
--- "License"); you may not use this file except in compliance
--- with the License. You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
-
-select LSTG_FORMAT_NAME,LSTG_SITE_ID,SLR_SEGMENT_CD,test_kylin_fact.CAL_DT,test_category_groupings.LEAF_CATEG_ID,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 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
\ No newline at end of file