static class Frameworks.StdFrameworkConfig extends java.lang.Object implements FrameworkConfig
FrameworkConfig
that uses standard Calcite
classes to provide basic planner functionality.Modifier and Type | Field and Description |
---|---|
private Context |
context |
private SqlRexConvertletTable |
convertletTable |
private RelOptCostFactory |
costFactory |
private SchemaPlus |
defaultSchema |
private boolean |
evolveLattice |
private RexExecutor |
executor |
private SqlOperatorTable |
operatorTable |
private SqlParser.Config |
parserConfig |
private com.google.common.collect.ImmutableList<Program> |
programs |
private SqlToRelConverter.Config |
sqlToRelConverterConfig |
private SqlStatisticProvider |
statisticProvider |
private com.google.common.collect.ImmutableList<RelTraitDef> |
traitDefs |
private RelDataTypeSystem |
typeSystem |
private RelOptTable.ViewExpander |
viewExpander |
Constructor and Description |
---|
StdFrameworkConfig(Context context,
SqlRexConvertletTable convertletTable,
SqlOperatorTable operatorTable,
com.google.common.collect.ImmutableList<Program> programs,
com.google.common.collect.ImmutableList<RelTraitDef> traitDefs,
SqlParser.Config parserConfig,
SqlToRelConverter.Config sqlToRelConverterConfig,
SchemaPlus defaultSchema,
RelOptCostFactory costFactory,
RelDataTypeSystem typeSystem,
RexExecutor executor,
boolean evolveLattice,
SqlStatisticProvider statisticProvider,
RelOptTable.ViewExpander viewExpander) |
Modifier and Type | Method and Description |
---|---|
Context |
getContext()
Returns the PlannerContext that should be made available during planning by
calling
RelOptPlanner.getContext() . |
SqlRexConvertletTable |
getConvertletTable()
Returns the convertlet table that should be used when converting from SQL
to row expressions
|
RelOptCostFactory |
getCostFactory()
Returns the cost factory that should be used when creating the planner.
|
SchemaPlus |
getDefaultSchema()
Returns the default schema that should be checked before looking at the
root schema.
|
RexExecutor |
getExecutor()
Returns the executor used to evaluate constant expressions.
|
SqlOperatorTable |
getOperatorTable()
Returns operator table that should be used to
resolve functions and operators during query validation.
|
SqlParser.Config |
getParserConfig()
The configuration of SQL parser.
|
com.google.common.collect.ImmutableList<Program> |
getPrograms()
Returns a list of one or more programs used during the course of query
evaluation.
|
SqlToRelConverter.Config |
getSqlToRelConverterConfig()
The configuration of
SqlToRelConverter . |
SqlStatisticProvider |
getStatisticProvider()
Returns the source of statistics about tables and columns to be used
by the lattice suggester to deduce primary keys, foreign keys, and the
direction of relationships.
|
com.google.common.collect.ImmutableList<RelTraitDef> |
getTraitDefs()
Returns a list of trait definitions.
|
RelDataTypeSystem |
getTypeSystem()
Returns the type system.
|
RelOptTable.ViewExpander |
getViewExpander()
Returns a view expander.
|
boolean |
isEvolveLattice()
Returns whether the lattice suggester should try to widen a lattice when a
new query arrives that doesn't quite fit, as opposed to creating a new
lattice.
|
private final Context context
private final SqlRexConvertletTable convertletTable
private final SqlOperatorTable operatorTable
private final com.google.common.collect.ImmutableList<Program> programs
private final com.google.common.collect.ImmutableList<RelTraitDef> traitDefs
private final SqlParser.Config parserConfig
private final SqlToRelConverter.Config sqlToRelConverterConfig
private final SchemaPlus defaultSchema
private final RelOptCostFactory costFactory
private final RelDataTypeSystem typeSystem
private final RexExecutor executor
private final boolean evolveLattice
private final SqlStatisticProvider statisticProvider
private final RelOptTable.ViewExpander viewExpander
StdFrameworkConfig(Context context, SqlRexConvertletTable convertletTable, SqlOperatorTable operatorTable, com.google.common.collect.ImmutableList<Program> programs, com.google.common.collect.ImmutableList<RelTraitDef> traitDefs, SqlParser.Config parserConfig, SqlToRelConverter.Config sqlToRelConverterConfig, SchemaPlus defaultSchema, RelOptCostFactory costFactory, RelDataTypeSystem typeSystem, RexExecutor executor, boolean evolveLattice, SqlStatisticProvider statisticProvider, RelOptTable.ViewExpander viewExpander)
public SqlParser.Config getParserConfig()
FrameworkConfig
getParserConfig
in interface FrameworkConfig
public SqlToRelConverter.Config getSqlToRelConverterConfig()
FrameworkConfig
SqlToRelConverter
.getSqlToRelConverterConfig
in interface FrameworkConfig
public SchemaPlus getDefaultSchema()
FrameworkConfig
getDefaultSchema
in interface FrameworkConfig
public RexExecutor getExecutor()
FrameworkConfig
getExecutor
in interface FrameworkConfig
public com.google.common.collect.ImmutableList<Program> getPrograms()
FrameworkConfig
The common use case is when there is a single program
created using Programs.of(RuleSet)
and Planner.transform(int, org.apache.calcite.plan.RelTraitSet, org.apache.calcite.rel.RelNode)
will only be called once.
However, consumers may also create programs
not based on rule sets, register multiple programs,
and do multiple repetitions
of Planner.transform(int, org.apache.calcite.plan.RelTraitSet, org.apache.calcite.rel.RelNode)
planning cycles using different indices.
The order of programs provided here determines the zero-based indices of programs elsewhere in this class.
getPrograms
in interface FrameworkConfig
public RelOptCostFactory getCostFactory()
FrameworkConfig
getCostFactory
in interface FrameworkConfig
public com.google.common.collect.ImmutableList<RelTraitDef> getTraitDefs()
FrameworkConfig
If the list is not null, the planner first de-registers any
existing RelTraitDef
s, then registers the RelTraitDef
s in
this list.
The order of RelTraitDef
s in the list matters if the
planner is VolcanoPlanner. The planner calls RelTraitDef.convert(org.apache.calcite.plan.RelOptPlanner, org.apache.calcite.rel.RelNode, T, boolean)
in
the order of this list. The most important trait comes first in the list,
followed by the second most important one, etc.
getTraitDefs
in interface FrameworkConfig
public SqlRexConvertletTable getConvertletTable()
FrameworkConfig
getConvertletTable
in interface FrameworkConfig
public Context getContext()
FrameworkConfig
RelOptPlanner.getContext()
.getContext
in interface FrameworkConfig
public SqlOperatorTable getOperatorTable()
FrameworkConfig
getOperatorTable
in interface FrameworkConfig
public RelDataTypeSystem getTypeSystem()
FrameworkConfig
getTypeSystem
in interface FrameworkConfig
public boolean isEvolveLattice()
FrameworkConfig
isEvolveLattice
in interface FrameworkConfig
public SqlStatisticProvider getStatisticProvider()
FrameworkConfig
getStatisticProvider
in interface FrameworkConfig
public RelOptTable.ViewExpander getViewExpander()
FrameworkConfig
getViewExpander
in interface FrameworkConfig
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.