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.ConfigAdds a transform togetRelBuilderConfigTransform().Returns the hint strategies used to decide how the hints are propagated to the relational expressions.default intReturns theinSubQueryThresholdoption, defaultSqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD.Returns a function that takes aRelBuilder.Configand returns another.Returns the factory to createRelBuilder, never null.default booleanWhether addSqlStdOperatorTable.JSON_TYPE_OPERATORfor between json functions.default booleanReturns thecreateValuesReloption.default booleanReturns thedecorrelationEnabledoption.default booleanisExpand()Returns theexpandoption.default booleanReturns theexplainoption.default booleanReturns whether to remove Sort operator for a sub-query if the Sort has no offset and fetch limit attributes.default booleanReturns thetrimUnusedFieldsoption.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 thedecorrelationEnabledoption. 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 thetrimUnusedFieldsoption. Controls whether to trim unused fields as part of the conversion process. -
withTrimUnusedFields
SetsisTrimUnusedFields(). -
isCreateValuesRel
@Default default boolean isCreateValuesRel()Returns thecreateValuesReloption. Controls whether instances ofLogicalValuesare generated. These may not be supported by all physical implementations. -
withCreateValuesRel
SetsisCreateValuesRel(). -
isExplain
@Default default boolean isExplain()Returns theexplainoption. Describes whether the current statement is part of an EXPLAIN PLAN statement. -
withExplain
SetsisExplain(). -
isExpand
@Default default boolean isExpand()Returns theexpandoption. Controls whether to expand sub-queries. If false (the default), each sub-query becomes aRexSubQuery.Setting
expandto 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 theinSubQueryThresholdoption, 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_VALUEforces 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.Configand 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_OPERATORfor between json functions. -
withAddJsonTypeOperatorEnabled
-