Interface SqlToRelConverter.Config

Enclosing class:
SqlToRelConverter

@Immutable(singleton=false) public static interface SqlToRelConverter.Config
Interface to define the configuration for a SqlToRelConverter. Provides methods to set each configuration option.
See Also:
  • Method Details

    • isDecorrelationEnabled

      @Default default boolean isDecorrelationEnabled()
      Returns the decorrelationEnabled option. Controls whether to disable sub-query decorrelation when needed. e.g. if outer joins are not supported.
    • withDecorrelationEnabled

      SqlToRelConverter.Config withDecorrelationEnabled(boolean decorrelationEnabled)
    • isTrimUnusedFields

      @Default default boolean isTrimUnusedFields()
      Returns the trimUnusedFields option. Controls whether to trim unused fields as part of the conversion process.
    • withTrimUnusedFields

      SqlToRelConverter.Config withTrimUnusedFields(boolean trimUnusedFields)
    • isCreateValuesRel

      @Default default boolean isCreateValuesRel()
      Returns the createValuesRel option. Controls whether instances of LogicalValues are generated. These may not be supported by all physical implementations.
    • withCreateValuesRel

      SqlToRelConverter.Config withCreateValuesRel(boolean createValuesRel)
    • isExplain

      @Default default boolean isExplain()
      Returns the explain option. Describes whether the current statement is part of an EXPLAIN PLAN statement.
    • withExplain

      SqlToRelConverter.Config withExplain(boolean explain)
    • isExpand

      @Default default boolean isExpand()
      Returns the expand option. Controls whether to expand sub-queries. If false (the default), each sub-query becomes a RexSubQuery.

      Setting expand to true is deprecated. Expansion still works, but there will be less development effort in that area.

    • withExpand

      SqlToRelConverter.Config withExpand(boolean expand)
      Sets isExpand().

      Expansion is deprecated. We recommend that you do not call this method, and use the default value of isExpand(), false.

    • getInSubQueryThreshold

      @Default default int getInSubQueryThreshold()
      Returns the inSubQueryThreshold option, default SqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD. Controls the list size threshold under which SqlToRelConverter.convertInToOr(org.apache.calcite.sql2rel.SqlToRelConverter.Blackboard, java.util.List<org.apache.calcite.rex.RexNode>, org.apache.calcite.sql.SqlNodeList, org.apache.calcite.sql.fun.SqlInOperator) is used. Lists of this size or greater will instead be converted to use a join against an inline table (LogicalValues) rather than a predicate. A threshold of 0 forces usage of an inline table in all cases; a threshold of Integer.MAX_VALUE forces usage of OR in all cases.
    • withInSubQueryThreshold

      SqlToRelConverter.Config withInSubQueryThreshold(int threshold)
    • isRemoveSortInSubQuery

      @Default default boolean isRemoveSortInSubQuery()
      Returns whether to remove Sort operator for a sub-query if the Sort has no offset and fetch limit attributes. Because the remove does not change the semantics, in many cases this is a promotion. Default is true.
    • withRemoveSortInSubQuery

      SqlToRelConverter.Config withRemoveSortInSubQuery(boolean removeSortInSubQuery)
    • getRelBuilderFactory

      org.apache.calcite.tools.RelBuilderFactory getRelBuilderFactory()
      Returns the factory to create RelBuilder, never null. Default is RelFactories.LOGICAL_BUILDER.
    • withRelBuilderFactory

      SqlToRelConverter.Config withRelBuilderFactory(org.apache.calcite.tools.RelBuilderFactory factory)
    • getRelBuilderConfigTransform

      UnaryOperator<RelBuilder.Config> getRelBuilderConfigTransform()
      Returns a function that takes a RelBuilder.Config and returns another. Default is the identity function.
    • withRelBuilderConfigTransform

      SqlToRelConverter.Config withRelBuilderConfigTransform(UnaryOperator<RelBuilder.Config> transform)
      See Also:
    • addRelBuilderConfigTransform

      default SqlToRelConverter.Config addRelBuilderConfigTransform(UnaryOperator<RelBuilder.Config> transform)
      Adds a transform to getRelBuilderConfigTransform().
    • getHintStrategyTable

      org.apache.calcite.rel.hint.HintStrategyTable getHintStrategyTable()
      Returns the hint strategies used to decide how the hints are propagated to the relational expressions. Default is HintStrategyTable.EMPTY.
    • withHintStrategyTable

      SqlToRelConverter.Config withHintStrategyTable(org.apache.calcite.rel.hint.HintStrategyTable hintStrategyTable)
    • isAddJsonTypeOperatorEnabled

      @Default default boolean isAddJsonTypeOperatorEnabled()
      Whether add SqlStdOperatorTable.JSON_TYPE_OPERATOR for between json functions.
    • withAddJsonTypeOperatorEnabled

      SqlToRelConverter.Config withAddJsonTypeOperatorEnabled(boolean addJsonTypeOperatorEnabled)