Class CalciteQueryPlanner
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sql.impl.CalciteQueryPlanner
-
- All Implemented Interfaces:
QueryPlanner
public class CalciteQueryPlanner extends java.lang.Object implements QueryPlanner
The core component to handle through a SQL statement, from explain execution plan, to generate a Beam pipeline.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCalciteQueryPlanner.NonCumulativeCostImpl-
Nested classes/interfaces inherited from interface org.apache.beam.sdk.extensions.sql.impl.QueryPlanner
QueryPlanner.Factory, QueryPlanner.QueryParameters
-
-
Field Summary
Fields Modifier and Type Field Description static QueryPlanner.FactoryFACTORY
-
Constructor Summary
Constructors Constructor Description CalciteQueryPlanner(JdbcConnection connection, java.util.Collection<org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.tools.RuleSet> ruleSets)Called byBeamSqlEnv.instantiatePlanner() reflectively.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BeamRelNodeconvertToBeamRel(java.lang.String sqlStatement, QueryPlanner.QueryParameters queryParameters)It parses and validate the input query, then convert into aBeamRelNodetree.org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.tools.FrameworkConfigdefaultConfig(JdbcConnection connection, java.util.Collection<org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.tools.RuleSet> ruleSets)org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.sql.SqlNodeparse(java.lang.String sqlStatement)Parse input SQL query, and return aSqlNodeas grammar tree.
-
-
-
Field Detail
-
FACTORY
public static final QueryPlanner.Factory FACTORY
-
-
Constructor Detail
-
CalciteQueryPlanner
public CalciteQueryPlanner(JdbcConnection connection, java.util.Collection<org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.tools.RuleSet> ruleSets)
Called byBeamSqlEnv.instantiatePlanner() reflectively.
-
-
Method Detail
-
defaultConfig
public org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.tools.FrameworkConfig defaultConfig(JdbcConnection connection, java.util.Collection<org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.tools.RuleSet> ruleSets)
-
parse
public org.apache.beam.vendor.calcite.v1_40_0.org.apache.calcite.sql.SqlNode parse(java.lang.String sqlStatement) throws ParseExceptionParse input SQL query, and return aSqlNodeas grammar tree.- Specified by:
parsein interfaceQueryPlanner- Throws:
ParseException
-
convertToBeamRel
public BeamRelNode convertToBeamRel(java.lang.String sqlStatement, QueryPlanner.QueryParameters queryParameters) throws ParseException, SqlConversionException
It parses and validate the input query, then convert into aBeamRelNodetree. Note that query parameters are not yet supported.- Specified by:
convertToBeamRelin interfaceQueryPlanner- Throws:
ParseExceptionSqlConversionException
-
-