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 2017/02/09 02:31:35 UTC
[22/39] kylin git commit: KYLIN-2406 fix model match rules when
having hanging OLAPTablescan
KYLIN-2406 fix model match rules when having hanging OLAPTablescan
Signed-off-by: lidongsjtu <li...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/1f444681
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/1f444681
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/1f444681
Branch: refs/heads/master-hbase0.98
Commit: 1f444681d30ed5f31997c2182cce0f388fef0347
Parents: ef0fc86
Author: etherge <et...@163.com>
Authored: Sat Feb 4 11:31:58 2017 +0800
Committer: lidongsjtu <li...@apache.org>
Committed: Mon Feb 6 17:06:55 2017 +0800
----------------------------------------------------------------------
.../main/java/org/apache/kylin/query/routing/ModelChooser.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/1f444681/query/src/main/java/org/apache/kylin/query/routing/ModelChooser.java
----------------------------------------------------------------------
diff --git a/query/src/main/java/org/apache/kylin/query/routing/ModelChooser.java b/query/src/main/java/org/apache/kylin/query/routing/ModelChooser.java
index f979f7b..507b371 100644
--- a/query/src/main/java/org/apache/kylin/query/routing/ModelChooser.java
+++ b/query/src/main/java/org/apache/kylin/query/routing/ModelChooser.java
@@ -106,6 +106,9 @@ public class ModelChooser {
// one lookup table
String modelAlias = model.findFirstTable(firstTable.getTableIdentity()).getAlias();
matchUp = ImmutableMap.of(firstTable.getAlias(), modelAlias);
+ } else if (ctx.joins.size() != ctx.allTableScans.size() - 1) {
+ // has hanging tables
+ throw new NoRealizationFoundException("Please adjust the sequence of join tables and put subquery or temporary table after lookup tables. " + toErrorMsg(ctx));
} else {
// normal big joins
if (ctx.joinsTree == null) {