KYLIN-2487 Do not convert large IN to subquery join during query planning
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/cde40f3f Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/cde40f3f Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/cde40f3f Branch: refs/heads/master-hbase0.98 Commit: cde40f3f220e2cdde618c2500c05bdce9daf586b Parents: 0e632fe Author: lidongsjtu <lid...@apache.org> Authored: Mon Mar 6 21:55:22 2017 +0800 Committer: lidongsjtu <lid...@apache.org> Committed: Mon Mar 6 21:55:27 2017 +0800 ---------------------------------------------------------------------- .../org/apache/calcite/sql2rel/SqlToRelConverter.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/cde40f3f/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java ---------------------------------------------------------------------- diff --git a/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java b/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java index 02c45a0..2c308f5 100644 --- a/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java +++ b/atopcalcite/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java @@ -193,7 +193,7 @@ import com.google.common.collect.Maps; /* * The code has synced with calcite. Hope one day, we could remove the hardcode override point. * OVERRIDE POINT: - * - getInSubqueryThreshold(), was `20`, now `Integer.MAX_VALUE` + * - DEFAULT_IN_SUB_QUERY_THRESHOLD, was `20`, now `Integer.MAX_VALUE` * - isTrimUnusedFields(), override to false * - AggConverter.translateAgg(...), skip column reading for COUNT(COL), for https://jirap.corp.ebay.com/browse/KYLIN-104 * - convertQuery(), call hackSelectStar() at the end @@ -217,7 +217,8 @@ public class SqlToRelConverter { /** Size of the smallest IN list that will be converted to a semijoin to a * static table. */ - public static final int DEFAULT_IN_SUB_QUERY_THRESHOLD = 20; + /* OVERRIDE POINT */ + public static final int DEFAULT_IN_SUB_QUERY_THRESHOLD = Integer.MAX_VALUE; @Deprecated // to be removed before 2.0 public static final int DEFAULT_IN_SUBQUERY_THRESHOLD = @@ -1017,7 +1018,7 @@ public class SqlToRelConverter { scope.getValidator().deriveType(scope, e); return e; } - + /** * Converts a WHERE clause. * @@ -1532,9 +1533,7 @@ public class SqlToRelConverter { */ @Deprecated // to be removed before 2.0 protected int getInSubqueryThreshold() { - //return config.getInSubQueryThreshold(); - /* OVERRIDE POINT */ - return Integer.MAX_VALUE; + return config.getInSubQueryThreshold(); } /**