Package org.apache.calcite.sql2rel
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 Summary
Modifier and TypeMethodDescriptiondefault SqlToRelConverter.Config
Adds a transform togetRelBuilderConfigTransform()
.Returns the hint strategies used to decide how the hints are propagated to the relational expressions.default int
Returns theinSubQueryThreshold
option, defaultSqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD
.Returns a function that takes aRelBuilder.Config
and returns another.Returns the factory to createRelBuilder
, never null.default boolean
Whether addSqlStdOperatorTable.JSON_TYPE_OPERATOR
for between json functions.default boolean
Returns thecreateValuesRel
option.default boolean
Returns thedecorrelationEnabled
option.default boolean
isExpand()
Returns theexpand
option.default boolean
Returns theexplain
option.default boolean
Returns whether to remove Sort operator for a sub-query if the Sort has no offset and fetch limit attributes.default boolean
Returns thetrimUnusedFields
option.withAddJsonTypeOperatorEnabled
(boolean addJsonTypeOperatorEnabled) withCreateValuesRel
(boolean createValuesRel) SetsisCreateValuesRel()
.withDecorrelationEnabled
(boolean decorrelationEnabled) SetsisDecorrelationEnabled()
.withExpand
(boolean expand) SetsisExpand()
.withExplain
(boolean explain) SetsisExplain()
.withHintStrategyTable
(HintStrategyTable hintStrategyTable) SetsgetHintStrategyTable()
.withInSubQueryThreshold
(int threshold) SetsgetInSubQueryThreshold()
.withRelBuilderFactory
(RelBuilderFactory factory) SetsgetRelBuilderFactory()
.withRemoveSortInSubQuery
(boolean removeSortInSubQuery) SetsisRemoveSortInSubQuery()
.withTrimUnusedFields
(boolean trimUnusedFields) SetsisTrimUnusedFields()
.
-
Method Details
-
isDecorrelationEnabled
@Default default boolean isDecorrelationEnabled()Returns thedecorrelationEnabled
option. Controls whether to disable sub-query decorrelation when needed. e.g. if outer joins are not supported. -
withDecorrelationEnabled
SetsisDecorrelationEnabled()
. -
isTrimUnusedFields
@Default default boolean isTrimUnusedFields()Returns thetrimUnusedFields
option. Controls whether to trim unused fields as part of the conversion process. -
withTrimUnusedFields
SetsisTrimUnusedFields()
. -
isCreateValuesRel
@Default default boolean isCreateValuesRel()Returns thecreateValuesRel
option. Controls whether instances ofLogicalValues
are generated. These may not be supported by all physical implementations. -
withCreateValuesRel
SetsisCreateValuesRel()
. -
isExplain
@Default default boolean isExplain()Returns theexplain
option. Describes whether the current statement is part of an EXPLAIN PLAN statement. -
withExplain
SetsisExplain()
. -
isExpand
@Default default boolean isExpand()Returns theexpand
option. Controls whether to expand sub-queries. If false (the default), each sub-query becomes aRexSubQuery
.Setting
expand
to true is deprecated. Expansion still works, but there will be less development effort in that area. -
withExpand
SetsisExpand()
.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 theinSubQueryThreshold
option, defaultSqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD
. Controls the list size threshold under whichSqlToRelConverter.convertInToOr(org.apache.calcite.sql2rel.SqlToRelConverter.Blackboard, java.util.List<org.apache.calcite.sql.SqlNode>, 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 ofInteger.MAX_VALUE
forces usage of OR in all cases. -
withInSubQueryThreshold
SetsgetInSubQueryThreshold()
. -
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
SetsisRemoveSortInSubQuery()
. -
getRelBuilderFactory
RelBuilderFactory getRelBuilderFactory()Returns the factory to createRelBuilder
, never null. Default isRelFactories.LOGICAL_BUILDER
. -
withRelBuilderFactory
SetsgetRelBuilderFactory()
. -
getRelBuilderConfigTransform
UnaryOperator<RelBuilder.Config> getRelBuilderConfigTransform()Returns a function that takes aRelBuilder.Config
and returns another. Default is the identity function. -
withRelBuilderConfigTransform
-
addRelBuilderConfigTransform
default SqlToRelConverter.Config addRelBuilderConfigTransform(UnaryOperator<RelBuilder.Config> transform) Adds a transform togetRelBuilderConfigTransform()
. -
getHintStrategyTable
HintStrategyTable getHintStrategyTable()Returns the hint strategies used to decide how the hints are propagated to the relational expressions. Default isHintStrategyTable.EMPTY
. -
withHintStrategyTable
SetsgetHintStrategyTable()
. -
isAddJsonTypeOperatorEnabled
@Default default boolean isAddJsonTypeOperatorEnabled()Whether addSqlStdOperatorTable.JSON_TYPE_OPERATOR
for between json functions. -
withAddJsonTypeOperatorEnabled
-