Package org.apache.calcite.sql2rel
Interface SqlToRelConverter.Config
-
- All Known Implementing Classes:
SqlToRelConverter.ConfigImpl
- Enclosing class:
- SqlToRelConverter
public static interface SqlToRelConverter.Config
Interface to define the configuration for a SqlToRelConverter. Provides methods to set each configuration option.
-
-
Field Summary
Fields Modifier and Type Field Description static SqlToRelConverter.Config
DEFAULT
Default configuration.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getInSubQueryThreshold()
Returns theinSubQueryThreshold
option, defaultSqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD
.RelBuilderFactory
getRelBuilderFactory()
Returns the factory to createRelBuilder
, never null.boolean
isConvertTableAccess()
Returns theconvertTableAccess
option.boolean
isCreateValuesRel()
Returns thecreateValuesRel
option.boolean
isDecorrelationEnabled()
Returns thedecorrelationEnabled
option.boolean
isExpand()
Returns theexpand
option.boolean
isExplain()
Returns theexplain
option.boolean
isTrimUnusedFields()
Returns thetrimUnusedFields
option.
-
-
-
Field Detail
-
DEFAULT
static final SqlToRelConverter.Config DEFAULT
Default configuration.
-
-
Method Detail
-
isConvertTableAccess
boolean isConvertTableAccess()
Returns theconvertTableAccess
option. Controls whether table access references are converted to physical rels immediately. The optimizer doesn't like leaf rels to haveConvention.NONE
. However, if we are doing further conversion passes (e.g.RelStructuredTypeFlattener
), then we may need to defer conversion.
-
isDecorrelationEnabled
boolean isDecorrelationEnabled()
Returns thedecorrelationEnabled
option. Controls whether to disable sub-query decorrelation when needed. e.g. if outer joins are not supported.
-
isTrimUnusedFields
boolean isTrimUnusedFields()
Returns thetrimUnusedFields
option. Controls whether to trim unused fields as part of the conversion process.
-
isCreateValuesRel
boolean isCreateValuesRel()
Returns thecreateValuesRel
option. Controls whether instances ofLogicalValues
are generated. These may not be supported by all physical implementations.
-
isExplain
boolean isExplain()
Returns theexplain
option. Describes whether the current statement is part of an EXPLAIN PLAN statement.
-
isExpand
boolean isExpand()
Returns theexpand
option. Controls whether to expand sub-queries. If false, each sub-query becomes aRexSubQuery
.
-
getInSubQueryThreshold
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.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 ofInteger.MAX_VALUE
forces usage of OR in all cases.
-
getRelBuilderFactory
RelBuilderFactory getRelBuilderFactory()
Returns the factory to createRelBuilder
, never null. Default isRelFactories.LOGICAL_BUILDER
.
-
-