Repository: kylin Updated Branches: refs/heads/master e04d27a38 -> 702339185
KYLIN-1016 Fix CI Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/70233918 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/70233918 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/70233918 Branch: refs/heads/master Commit: 70233918519190026f8ab3067c03ab8510a12163 Parents: e04d27a Author: lidongsjtu <[email protected]> Authored: Wed Apr 20 20:11:00 2016 +0800 Committer: lidongsjtu <[email protected]> Committed: Wed Apr 20 20:11:18 2016 +0800 ---------------------------------------------------------------------- .../org/apache/kylin/query/ITIIQueryTest.java | 6 ++++ .../apache/kylin/query/ITKylinQueryTest.java | 5 ++++ .../src/test/resources/query/sql/query100.sql | 30 ------------------- .../src/test/resources/query/sql/query101.sql | 21 ------------- .../query/sql_distinct_dim/query100.sql | 31 ++++++++++++++++++++ .../query/sql_distinct_dim/query101.sql | 21 +++++++++++++ 6 files changed, 63 insertions(+), 51 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/70233918/kylin-it/src/test/java/org/apache/kylin/query/ITIIQueryTest.java ---------------------------------------------------------------------- diff --git a/kylin-it/src/test/java/org/apache/kylin/query/ITIIQueryTest.java b/kylin-it/src/test/java/org/apache/kylin/query/ITIIQueryTest.java index 3f470cb..985424c 100644 --- a/kylin-it/src/test/java/org/apache/kylin/query/ITIIQueryTest.java +++ b/kylin-it/src/test/java/org/apache/kylin/query/ITIIQueryTest.java @@ -83,4 +83,10 @@ public class ITIIQueryTest extends ITKylinQueryTest { @Ignore("Skip Precisely Distinct Count Queries for II") public void testPreciselyDistinctCountQuery() { } + + @Override + @Test + @Ignore("Skip Dimension Distinct Count Queries for II") + public void testDimDistinctCountQuery() { + } } http://git-wip-us.apache.org/repos/asf/kylin/blob/70233918/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 7de0484..5e7b130 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 @@ -176,6 +176,11 @@ public class ITKylinQueryTest extends KylinTestBase { } @Test + public void testDimDistinctCountQuery() throws Exception { + execAndCompQuery("src/test/resources/query/sql_distinct_dim", null, true); + } + + @Test public void testPreciselyDistinctCountQuery() throws Exception { if ("left".equalsIgnoreCase(joinType)) { execAndCompQuery("src/test/resources/query/sql_distinct_precisely", null, true); http://git-wip-us.apache.org/repos/asf/kylin/blob/70233918/kylin-it/src/test/resources/query/sql/query100.sql ---------------------------------------------------------------------- diff --git a/kylin-it/src/test/resources/query/sql/query100.sql b/kylin-it/src/test/resources/query/sql/query100.sql deleted file mode 100644 index acad43c..0000000 --- a/kylin-it/src/test/resources/query/sql/query100.sql +++ /dev/null @@ -1,30 +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.seller_id - ,count(DISTINCT test_cal_dt.cal_dt) as CNT_DT - ,count(DISTINCT test_kylin_fact.leaf_categ_id) as CNT_CATE_LEAF - ,count(DISTINCT test_kylin_fact.lstg_format_name) as CNT_LSTG - ,count(test_cal_dt.cal_dt) as TRANS_CNT - 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.lstg_site_id = test_category_groupings.site_id AND test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id - group by test_kylin_fact.seller_id \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/70233918/kylin-it/src/test/resources/query/sql/query101.sql ---------------------------------------------------------------------- diff --git a/kylin-it/src/test/resources/query/sql/query101.sql b/kylin-it/src/test/resources/query/sql/query101.sql deleted file mode 100644 index a5350c4..0000000 --- a/kylin-it/src/test/resources/query/sql/query101.sql +++ /dev/null @@ -1,21 +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 seller_id, lstg_site_id, count(DISTINCT leaf_categ_id) as CategCount -from test_kylin_fact -group by seller_id, lstg_site_id \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/70233918/kylin-it/src/test/resources/query/sql_distinct_dim/query100.sql ---------------------------------------------------------------------- diff --git a/kylin-it/src/test/resources/query/sql_distinct_dim/query100.sql b/kylin-it/src/test/resources/query/sql_distinct_dim/query100.sql new file mode 100644 index 0000000..e10009a --- /dev/null +++ b/kylin-it/src/test/resources/query/sql_distinct_dim/query100.sql @@ -0,0 +1,31 @@ +-- +-- 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.seller_id + ,count(DISTINCT test_cal_dt.cal_dt) as CNT_DT + ,count(DISTINCT test_kylin_fact.leaf_categ_id) as CNT_CATE_LEAF + ,count(DISTINCT test_kylin_fact.lstg_format_name) as CNT_LSTG + ,count(DISTINCT test_category_groupings.meta_categ_name) as CNT_CATE + ,count(test_cal_dt.cal_dt) as TRANS_CNT + 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.lstg_site_id = test_category_groupings.site_id AND test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id + group by test_kylin_fact.seller_id \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/70233918/kylin-it/src/test/resources/query/sql_distinct_dim/query101.sql ---------------------------------------------------------------------- diff --git a/kylin-it/src/test/resources/query/sql_distinct_dim/query101.sql b/kylin-it/src/test/resources/query/sql_distinct_dim/query101.sql new file mode 100644 index 0000000..a5350c4 --- /dev/null +++ b/kylin-it/src/test/resources/query/sql_distinct_dim/query101.sql @@ -0,0 +1,21 @@ +-- +-- 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 seller_id, lstg_site_id, count(DISTINCT leaf_categ_id) as CategCount +from test_kylin_fact +group by seller_id, lstg_site_id \ No newline at end of file
