[GitHub] [calcite] amaliujia commented on a change in pull request #1991: [CALCITE-3916] Support top-down rule apply and upper bound space pruning
amaliujia commented on a change in pull request #1991: URL: https://github.com/apache/calcite/pull/1991#discussion_r432883346 ## File path: core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java ## @@ -124,12 +124,21 @@ /** * Whether to enable top-down optimization. * - * Note: Enabling top-down optimization will automatically disable - * the use of AbstractConverter and related rules. + * Note: Enabling top-down optimization will automatically enable + * top-down trait propagation. */ public static final CalciteSystemProperty TOPDOWN_OPT = booleanProperty("calcite.planner.topdown.opt", false); + /** + * Whether to enable top-down trait propagation. + * + * Note: Enabling top-down optimization will automatically disable + * the use of AbstractConverter and related rules. + */ + public static final CalciteSystemProperty TOPDOWN_TRAITS = + booleanProperty("calcite.planner.topdown.traits", false); Review comment: Why adding this new flag to control traits propagation? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] amaliujia commented on a change in pull request #1991: [CALCITE-3916] Support top-down rule apply and upper bound space pruning
amaliujia commented on a change in pull request #1991: URL: https://github.com/apache/calcite/pull/1991#discussion_r432883073 ## File path: core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java ## @@ -105,6 +105,10 @@ * {@link org.apache.calcite.sql.parser.SqlParserImplFactory}. */ PARSER_FACTORY("parserFactory", Type.PLUGIN, null, false), + /** Specifies whether to use top down optimization. + * {@link org.apache.calcite.plan.volcano.VolcanoPlanner#setTopDownOpt(boolean)} */ + TOP_DOWN_OPT("topDownOpt", Type.BOOLEAN, true, false), Review comment: I think you need a rebase to master. The similar code was already added in https://github.com/apache/calcite/pull/1985 ## File path: core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java ## @@ -105,6 +105,10 @@ * {@link org.apache.calcite.sql.parser.SqlParserImplFactory}. */ PARSER_FACTORY("parserFactory", Type.PLUGIN, null, false), + /** Specifies whether to use top down optimization. + * {@link org.apache.calcite.plan.volcano.VolcanoPlanner#setTopDownOpt(boolean)} */ + TOP_DOWN_OPT("topDownOpt", Type.BOOLEAN, true, false), Review comment: I think you need a rebase on master. The similar code was already added in https://github.com/apache/calcite/pull/1985 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[calcite] branch master updated: [CALCITE-4031] Remove code to be removed before 1.24
This is an automated email from the ASF dual-hosted git repository. danny0405 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/calcite.git The following commit(s) were added to refs/heads/master by this push: new 61bba25 [CALCITE-4031] Remove code to be removed before 1.24 61bba25 is described below commit 61bba252075abad42f4b239636367acead838144 Author: yuzhao.cyz AuthorDate: Fri May 29 16:57:42 2020 +0800 [CALCITE-4031] Remove code to be removed before 1.24 * Remove code to be removed before 1.24; * Make sure that any code labelled @Deprecated is followed by a comment 'to be removed before x.x'; * Fix some code which uses Bug.upgrade(); * Some cosmetic changes. --- .../calcite/config/CalciteConnectionProperty.java | 26 +--- .../org/apache/calcite/interpreter/Bindables.java | 13 -- .../apache/calcite/jdbc/ContextSqlValidator.java | 3 +- .../apache/calcite/plan/AbstractRelOptPlanner.java | 4 - .../org/apache/calcite/plan/RelOptPlanner.java | 19 --- .../java/org/apache/calcite/plan/RelTraitDef.java | 18 --- .../calcite/plan/volcano/VolcanoPlanner.java | 8 -- .../apache/calcite/rel/hint/HintOptionChecker.java | 11 +- .../org/apache/calcite/rel/hint/HintStrategy.java | 4 +- .../apache/calcite/rel/hint/HintStrategyTable.java | 23 +-- .../java/org/apache/calcite/rel/hint/RelHint.java | 67 + .../apache/calcite/rel/rules/DateRangeRules.java | 3 - .../main/java/org/apache/calcite/rex/RexUtil.java | 2 +- .../main/java/org/apache/calcite/runtime/Hook.java | 4 +- .../org/apache/calcite/runtime/SqlFunctions.java | 10 +- .../org/apache/calcite/sql/advise/SqlAdvisor.java | 2 +- .../apache/calcite/sql/advise/SqlSimpleParser.java | 4 +- .../apache/calcite/sql/validate/SqlValidator.java | 155 - .../calcite/sql/validate/SqlValidatorImpl.java | 19 --- .../validate/implicit/AbstractTypeCoercion.java| 10 +- .../sql/validate/implicit/TypeCoercion.java| 24 ++-- .../org/apache/calcite/util/ImmutableIntList.java | 10 +- .../calcite/test/AbstractMaterializedViewTest.java | 82 ++- .../org/apache/calcite/test/CalciteAssert.java | 13 -- .../apache/calcite/linq4j/function/Functions.java | 7 +- .../calcite/linq4j/function/FunctionTest.java | 7 +- 26 files changed, 135 insertions(+), 413 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java b/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java index a061fb7..f09b052 100644 --- a/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java +++ b/core/src/main/java/org/apache/calcite/config/CalciteConnectionProperty.java @@ -21,16 +21,15 @@ import org.apache.calcite.avatica.util.Casing; import org.apache.calcite.avatica.util.Quoting; import org.apache.calcite.model.JsonSchema; import org.apache.calcite.sql.validate.SqlConformanceEnum; -import org.apache.calcite.util.Bug; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.Locale; import java.util.Map; import java.util.Properties; import java.util.TimeZone; import static org.apache.calcite.avatica.ConnectionConfigImpl.PropEnv; +import static org.apache.calcite.avatica.ConnectionConfigImpl.parse; /** * Properties that may be specified on the JDBC connect string. @@ -222,27 +221,6 @@ public enum CalciteConnectionProperty implements ConnectionProperty { } public PropEnv wrap(Properties properties) { -return new PropEnv(parse2(properties, NAME_TO_PROPS), this); +return new PropEnv(parse(properties, NAME_TO_PROPS), this); } - - /** Fixed version of - * {@link org.apache.calcite.avatica.ConnectionConfigImpl#parse} - * until we upgrade Avatica. */ - private static Map parse2(Properties properties, - Map nameToProps) { -Bug.upgrade("avatica-1.10"); -final Map map = new LinkedHashMap<>(); -for (String name : properties.stringPropertyNames()) { - final ConnectionProperty connectionProperty = - nameToProps.get(name.toUpperCase(Locale.ROOT)); - if (connectionProperty == null) { -// For now, don't throw. It messes up sub-projects. -//throw new RuntimeException("Unknown property '" + name + "'"); -continue; - } - map.put(connectionProperty, properties.getProperty(name)); -} -return map; - } - } diff --git a/core/src/main/java/org/apache/calcite/interpreter/Bindables.java b/core/src/main/java/org/apache/calcite/interpreter/Bindables.java index 8490405..958437a 100644 --- a/core/src/main/java/org/apache/calcite/interpreter/Bindables.java +++ b/core/src/main/java/org/apache/calcite/interpreter/Bindables.java @@ -521,19 +521,6 @@ public class Bindables { } } - @Deprecated // Use BindableSetOpRule instead, to be removed before 1.24.0 - public static class BindableUnionRule extends BindableS
[GitHub] [calcite] danny0405 merged pull request #1993: [CALCITE-4031] Remove code to be removed before 1.24
danny0405 merged pull request #1993: URL: https://github.com/apache/calcite/pull/1993 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org