This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 31073af0285bb43cdee5ec844ef455d98e193c86 Author: Yifan Zhang <event.dim...@gmail.com> AuthorDate: Tue Jun 12 14:57:29 2018 +0800 KYLIN-3403 Use IntegerCodeSystem for date type filter Signed-off-by: shaofengshi <shaofeng...@apache.org> --- .../metadata/filter/FilterCodeSystemFactory.java | 2 ++ kylin-it/src/test/resources/query/sql/query112.sql | 29 ++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/FilterCodeSystemFactory.java b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/FilterCodeSystemFactory.java index bae8cf9..cf98956 100644 --- a/core-metadata/src/main/java/org/apache/kylin/metadata/filter/FilterCodeSystemFactory.java +++ b/core-metadata/src/main/java/org/apache/kylin/metadata/filter/FilterCodeSystemFactory.java @@ -41,6 +41,8 @@ public class FilterCodeSystemFactory { return codeSystemMap.get("integer"); } else if (dataType.isNumberFamily()) { return codeSystemMap.get("decimal"); + } else if (dataType.isDateTimeFamily()) { + return codeSystemMap.get("integer"); } else { return codeSystemMap.get("string"); } diff --git a/kylin-it/src/test/resources/query/sql/query112.sql b/kylin-it/src/test/resources/query/sql/query112.sql new file mode 100644 index 0000000..efd0d88 --- /dev/null +++ b/kylin-it/src/test/resources/query/sql/query112.sql @@ -0,0 +1,29 @@ +-- +-- 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 COUNT(1) 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.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 test_cal_dt.WEEK_BEG_DT >= '2001-09-09' + AND test_cal_dt.WEEK_BEG_DT <= '2018-05-16' + \ No newline at end of file