KYLIN-2407 fix OLAPTableScan choose exec function issue Signed-off-by: Yang Li <liy...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/c85a0e73 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/c85a0e73 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/c85a0e73 Branch: refs/heads/master-hbase0.98 Commit: c85a0e73192ea65d5bf12d116a0f791261365753 Parents: 4ddcc69 Author: etherge <ethe...@163.com> Authored: Wed Feb 15 13:30:44 2017 +0800 Committer: Yang Li <liy...@apache.org> Committed: Sun Apr 2 09:15:10 2017 +0800 ---------------------------------------------------------------------- .../resources/query/sql_subquery/query15.sql | 29 ++++++++++++++++++++ .../kylin/query/relnode/OLAPTableScan.java | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/c85a0e73/kylin-it/src/test/resources/query/sql_subquery/query15.sql ---------------------------------------------------------------------- diff --git a/kylin-it/src/test/resources/query/sql_subquery/query15.sql b/kylin-it/src/test/resources/query/sql_subquery/query15.sql new file mode 100644 index 0000000..330dc27 --- /dev/null +++ b/kylin-it/src/test/resources/query/sql_subquery/query15.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 + week_beg_dt +FROM + edw.test_cal_dt t1 +WHERE + t1.cal_dt IN (SELECT + cal_dt + FROM + test_kylin_fact + WHERE + lstg_format_name = 'ABIN') \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/c85a0e73/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java ---------------------------------------------------------------------- diff --git a/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java b/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java index 35dd73f..75c9c3e 100644 --- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java +++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPTableScan.java @@ -283,7 +283,7 @@ public class OLAPTableScan extends TableScan implements OLAPRel, EnumerableRel { private String genExecFunc() { // if the table to scan is not the fact table of cube, then it's a lookup table - if (context.hasJoin == false && context.realization.getModel().isLookupTable(tableName)) { + if (context.realization.getModel().isLookupTable(tableName)) { return "executeLookupTableQuery"; } else { return "executeOLAPQuery";