KYLIN-1875 minor, test fixes
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/365caaeb Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/365caaeb Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/365caaeb Branch: refs/heads/master Commit: 365caaebd841917f161dab37b0af7c055626194c Parents: 92e4d46 Author: Yang Li <liy...@apache.org> Authored: Fri Dec 2 06:32:25 2016 +0800 Committer: Li Yang <liy...@apache.org> Committed: Wed Dec 7 17:53:46 2016 +0800 ---------------------------------------------------------------------- .../metadata/filter/ColumnTupleFilter.java | 1 + .../kylin/metadata/model/DataModelDesc.java | 2 +- .../apache/kylin/metadata/model/TblColRef.java | 2 +- .../template/model_desc/kylin_sales_model.json | 4 +++ .../apache/kylin/query/ITKylinQueryTest.java | 2 +- .../resources/query/sql_subquery/query02.sql | 31 ++++++++++++++++++++ .../query/sql_subquery/query02.sql.disable | 25 ---------------- 7 files changed, 39 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/365caaeb/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ColumnTupleFilter.java ---------------------------------------------------------------------- diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ColumnTupleFilter.java b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ColumnTupleFilter.java index c8a8f07..ecb8e61 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ColumnTupleFilter.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/ColumnTupleFilter.java @@ -121,6 +121,7 @@ public class ColumnTupleFilter extends TupleFilter { } } + @SuppressWarnings("deprecation") @Override public void deserialize(IFilterCodeSystem<?> cs, ByteBuffer buffer) { http://git-wip-us.apache.org/repos/asf/kylin/blob/365caaeb/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 898ff74..3f868a2 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 @@ -112,7 +112,7 @@ public class DataModelDesc extends RootPersistentEntity { return name; } - // for test only + // for test mainly @Deprecated public void setName(String name) { this.name = name; http://git-wip-us.apache.org/repos/asf/kylin/blob/365caaeb/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java ---------------------------------------------------------------------- diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java b/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java index bf8d36b..5d72c3f 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/model/TblColRef.java @@ -84,7 +84,7 @@ public class TblColRef implements Serializable { col.table = tableRef; } - // for test only + // for test mainly public static TblColRef mockup(TableDesc table, int oneBasedColumnIndex, String name, String datatype) { ColumnDesc desc = new ColumnDesc(); String id = "" + oneBasedColumnIndex; http://git-wip-us.apache.org/repos/asf/kylin/blob/365caaeb/examples/sample_cube/template/model_desc/kylin_sales_model.json ---------------------------------------------------------------------- diff --git a/examples/sample_cube/template/model_desc/kylin_sales_model.json b/examples/sample_cube/template/model_desc/kylin_sales_model.json index 2d3cfb6..cce360f 100644 --- a/examples/sample_cube/template/model_desc/kylin_sales_model.json +++ b/examples/sample_cube/template/model_desc/kylin_sales_model.json @@ -18,6 +18,7 @@ }, { "table" : "DEFAULT.KYLIN_ACCOUNT", "alias" : "BUYER_ACCOUNT", + "kind" : "LOOKUP", "join" : { "type" : "inner", "primary_key" : [ "ACCOUNT_ID" ], @@ -26,6 +27,7 @@ }, { "table" : "DEFAULT.KYLIN_ACCOUNT", "alias" : "SELLER_ACCOUNT", + "kind" : "LOOKUP", "join" : { "type" : "inner", "primary_key" : [ "ACCOUNT_ID" ], @@ -34,6 +36,7 @@ }, { "table" : "DEFAULT.KYLIN_COUNTRY", "alias" : "BUYER_COUNTRY", + "kind" : "LOOKUP", "join" : { "type" : "inner", "primary_key" : [ "COUNTRY" ], @@ -42,6 +45,7 @@ }, { "table" : "DEFAULT.KYLIN_COUNTRY", "alias" : "SELLER_COUNTRY", + "kind" : "LOOKUP", "join" : { "type" : "inner", "primary_key" : [ "COUNTRY" ], http://git-wip-us.apache.org/repos/asf/kylin/blob/365caaeb/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 6d91753..90324b5 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 @@ -48,7 +48,7 @@ import org.junit.rules.ExpectedException; import com.google.common.collect.Maps; -//@Ignore("KylinQueryTest is contained by ITCombinationTest") +@Ignore("KylinQueryTest is contained by ITCombinationTest") public class ITKylinQueryTest extends KylinTestBase { @Rule http://git-wip-us.apache.org/repos/asf/kylin/blob/365caaeb/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 new file mode 100644 index 0000000..e6751b7 --- /dev/null +++ b/kylin-it/src/test/resources/query/sql_subquery/query02.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 + week_beg_dt + ,sum(price) as sum_price +FROM +( + select + 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 +) t +group by week_beg_dt http://git-wip-us.apache.org/repos/asf/kylin/blob/365caaeb/kylin-it/src/test/resources/query/sql_subquery/query02.sql.disable ---------------------------------------------------------------------- diff --git a/kylin-it/src/test/resources/query/sql_subquery/query02.sql.disable b/kylin-it/src/test/resources/query/sql_subquery/query02.sql.disable deleted file mode 100644 index 968dbae..0000000 --- a/kylin-it/src/test/resources/query/sql_subquery/query02.sql.disable +++ /dev/null @@ -1,25 +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 sum(1) AS "COL" - FROM ( - select test_cal_dt.week_beg_dt, sum(test_kylin_fact.price) as sum_price - from test_kylin_fact - inner join test_cal_dt ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - group by test_cal_dt.week_beg_dt - ) "TableauSQL"