private static class SqlToRelConverter.ConfigImpl extends java.lang.Object implements SqlToRelConverter.Config
SqlToRelConverter.Config
.
Called by builder; all values are in private final fields.Modifier and Type | Field and Description |
---|---|
private boolean |
convertTableAccess |
private boolean |
createValuesRel |
private boolean |
decorrelationEnabled |
private boolean |
expand |
private boolean |
explain |
private int |
inSubQueryThreshold |
private RelBuilderFactory |
relBuilderFactory |
private boolean |
trimUnusedFields |
DEFAULT
Modifier | Constructor and Description |
---|---|
private |
ConfigImpl(boolean convertTableAccess,
boolean decorrelationEnabled,
boolean trimUnusedFields,
boolean createValuesRel,
boolean explain,
boolean expand,
int inSubQueryThreshold,
RelBuilderFactory relBuilderFactory) |
Modifier and Type | Method and Description |
---|---|
int |
getInSubQueryThreshold()
Returns the
inSubQueryThreshold option,
default SqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD . |
RelBuilderFactory |
getRelBuilderFactory()
Returns the factory to create
RelBuilder , never null. |
boolean |
isConvertTableAccess()
Returns the
convertTableAccess option. |
boolean |
isCreateValuesRel()
Returns the
createValuesRel option. |
boolean |
isDecorrelationEnabled()
Returns the
decorrelationEnabled option. |
boolean |
isExpand()
Returns the
expand option. |
boolean |
isExplain()
Returns the
explain option. |
boolean |
isTrimUnusedFields()
Returns the
trimUnusedFields option. |
private final boolean convertTableAccess
private final boolean decorrelationEnabled
private final boolean trimUnusedFields
private final boolean createValuesRel
private final boolean explain
private final boolean expand
private final int inSubQueryThreshold
private final RelBuilderFactory relBuilderFactory
private ConfigImpl(boolean convertTableAccess, boolean decorrelationEnabled, boolean trimUnusedFields, boolean createValuesRel, boolean explain, boolean expand, int inSubQueryThreshold, RelBuilderFactory relBuilderFactory)
public boolean isConvertTableAccess()
SqlToRelConverter.Config
convertTableAccess
option. Controls whether table
access references are converted to physical rels immediately. The
optimizer doesn't like leaf rels to have Convention.NONE
.
However, if we are doing further conversion passes (e.g.
RelStructuredTypeFlattener
), then we may need to defer
conversion.isConvertTableAccess
in interface SqlToRelConverter.Config
public boolean isDecorrelationEnabled()
SqlToRelConverter.Config
decorrelationEnabled
option. Controls whether to
disable sub-query decorrelation when needed. e.g. if outer joins are not
supported.isDecorrelationEnabled
in interface SqlToRelConverter.Config
public boolean isTrimUnusedFields()
SqlToRelConverter.Config
trimUnusedFields
option. Controls whether to trim
unused fields as part of the conversion process.isTrimUnusedFields
in interface SqlToRelConverter.Config
public boolean isCreateValuesRel()
SqlToRelConverter.Config
createValuesRel
option. Controls whether instances
of LogicalValues
are generated.
These may not be supported by all physical implementations.isCreateValuesRel
in interface SqlToRelConverter.Config
public boolean isExplain()
SqlToRelConverter.Config
explain
option. Describes whether the current
statement is part of an EXPLAIN PLAN statement.isExplain
in interface SqlToRelConverter.Config
public boolean isExpand()
SqlToRelConverter.Config
expand
option. Controls whether to expand
sub-queries. If false, each sub-query becomes a
RexSubQuery
.isExpand
in interface SqlToRelConverter.Config
public int getInSubQueryThreshold()
SqlToRelConverter.Config
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.getInSubQueryThreshold
in interface SqlToRelConverter.Config
public RelBuilderFactory getRelBuilderFactory()
SqlToRelConverter.Config
RelBuilder
, never null. Default is
RelFactories.LOGICAL_BUILDER
.getRelBuilderFactory
in interface SqlToRelConverter.Config
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.