@Internal public class PlannerContext extends Object
RelBuilder
or FrameworkConfig
used to create a corresponding Planner
. It tries to separate
static elements in a TableEnvironment
like: root schema, cost
factory, type system etc. from a dynamic properties like e.g. default path to look for objects in
the schema.Constructor and Description |
---|
PlannerContext(TableConfig tableConfig,
FunctionCatalog functionCatalog,
CatalogManager catalogManager,
org.apache.calcite.jdbc.CalciteSchema rootSchema,
List<org.apache.calcite.plan.RelTraitDef> traitDefs) |
Modifier and Type | Method and Description |
---|---|
CalciteParser |
createCalciteParser()
Creates a configured instance of
CalciteParser . |
FlinkCalciteCatalogReader |
createCatalogReader(boolean lenientCaseSensitivity,
String currentCatalog,
String currentDatabase) |
org.apache.flink.table.planner.calcite.FlinkPlannerImpl |
createFlinkPlanner(String currentCatalog,
String currentDatabase)
Creates a configured
FlinkPlannerImpl for a planning session. |
org.apache.calcite.tools.FrameworkConfig |
createFrameworkConfig() |
org.apache.flink.table.planner.calcite.FlinkRelBuilder |
createRelBuilder(String currentCatalog,
String currentDatabase)
Creates a configured
FlinkRelBuilder for a planning session. |
org.apache.calcite.plan.RelOptCluster |
getCluster() |
org.apache.flink.table.planner.calcite.FlinkContext |
getFlinkContext()
Returns the
FlinkContext . |
SqlExprToRexConverterFactory |
getSqlExprToRexConverterFactory() |
org.apache.flink.table.planner.calcite.FlinkTypeFactory |
getTypeFactory()
Returns the
FlinkTypeFactory that will be used. |
public PlannerContext(TableConfig tableConfig, FunctionCatalog functionCatalog, CatalogManager catalogManager, org.apache.calcite.jdbc.CalciteSchema rootSchema, List<org.apache.calcite.plan.RelTraitDef> traitDefs)
public SqlExprToRexConverterFactory getSqlExprToRexConverterFactory()
public org.apache.calcite.tools.FrameworkConfig createFrameworkConfig()
public org.apache.flink.table.planner.calcite.FlinkTypeFactory getTypeFactory()
FlinkTypeFactory
that will be used.public org.apache.flink.table.planner.calcite.FlinkContext getFlinkContext()
FlinkContext
.public org.apache.flink.table.planner.calcite.FlinkRelBuilder createRelBuilder(String currentCatalog, String currentDatabase)
FlinkRelBuilder
for a planning session.currentCatalog
- the current default catalog to look for first during planning.currentDatabase
- the current default database to look for first during planning.public org.apache.flink.table.planner.calcite.FlinkPlannerImpl createFlinkPlanner(String currentCatalog, String currentDatabase)
FlinkPlannerImpl
for a planning session.currentCatalog
- the current default catalog to look for first during planning.currentDatabase
- the current default database to look for first during planning.public CalciteParser createCalciteParser()
CalciteParser
.public FlinkCalciteCatalogReader createCatalogReader(boolean lenientCaseSensitivity, String currentCatalog, String currentDatabase)
public org.apache.calcite.plan.RelOptCluster getCluster()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.