| Modifier and Type | Class and Description |
|---|---|
class |
PlannerImpl.ViewExpanderImpl
Implements
RelOptTable.ViewExpander
interface for Planner. |
| Constructor and Description |
|---|
PlannerImpl(FrameworkConfig config)
Creates a planner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases all internal resources utilized while this
Planner
exists. |
RelNode |
convert(SqlNode sql)
Converts a SQL parse tree into a tree of relational expressions.
|
RelTraitSet |
getEmptyTraitSet() |
JavaTypeFactory |
getTypeFactory()
Returns the type factory.
|
SqlNode |
parse(String sql)
Parses and validates a SQL statement.
|
void |
reset()
Resets this
Planner to be used with a new query. |
RelNode |
transform(int ruleSetIndex,
RelTraitSet requiredOutputTraits,
RelNode rel)
Converts one relational expression tree into another relational expression
based on a particular rule set and requires set of traits.
|
SqlNode |
validate(SqlNode sqlNode)
Validates a SQL statement.
|
public PlannerImpl(FrameworkConfig config)
Frameworks.getPlanner(org.apache.calcite.tools.FrameworkConfig) instead.public RelTraitSet getEmptyTraitSet()
getEmptyTraitSet in interface Plannerpublic void close()
PlannerPlanner
exists. Once called, this Planner object is no longer valid.public void reset()
PlannerPlanner to be used with a new query. This
should be called between each new query.public SqlNode parse(String sql) throws SqlParseException
Plannerparse in interface Plannersql - The SQL statement to parse.SqlParseException - on parse errorpublic SqlNode validate(SqlNode sqlNode) throws ValidationException
Plannervalidate in interface PlannersqlNode - Root node of the SQL parse tree.ValidationException - if not validpublic RelNode convert(SqlNode sql) throws RelConversionException
PlannerYou must call Planner.validate(org.apache.calcite.sql.SqlNode) first.
convert in interface Plannersql - The root node of the SQL parse tree.RelConversionException - if the node
cannot be converted or has not been validatedpublic JavaTypeFactory getTypeFactory()
PlannergetTypeFactory in interface Plannerpublic RelNode transform(int ruleSetIndex, RelTraitSet requiredOutputTraits, RelNode rel) throws RelConversionException
Plannertransform in interface PlannerruleSetIndex - The RuleSet to use for conversion purposes. Note that
this is zero-indexed and is based on the list and order
of RuleSets provided in the construction of this
Planner.requiredOutputTraits - The set of RelTraits required of the root node
at the termination of the planning cycle.rel - The root of the RelNode tree to convert.RelConversionException - on conversion
errorCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.