public class BeamQueryPlanner
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Planner |
planner |
static JavaTypeFactory |
TYPE_FACTORY |
Constructor and Description |
---|
BeamQueryPlanner(SchemaPlus schema) |
Modifier and Type | Method and Description |
---|---|
PCollection<BeamRecord> |
compileBeamPipeline(java.lang.String sqlStatement,
Pipeline basePipeline,
BeamSqlEnv sqlEnv)
compileBeamPipeline translate a SQL statement to executed as Beam data flow,
which is linked with the given pipeline . |
BeamRelNode |
convertToBeamRel(java.lang.String sqlStatement)
It parses and validate the input query, then convert into a
BeamRelNode tree. |
Planner |
getPlanner() |
java.util.Map<java.lang.String,BeamSqlTable> |
getSourceTables() |
SqlNode |
parseQuery(java.lang.String sqlQuery)
Parse input SQL query, and return a
SqlNode as grammar tree. |
protected final Planner planner
public static final JavaTypeFactory TYPE_FACTORY
public SqlNode parseQuery(java.lang.String sqlQuery) throws SqlParseException
SqlNode
as grammar tree.SqlParseException
public PCollection<BeamRecord> compileBeamPipeline(java.lang.String sqlStatement, Pipeline basePipeline, BeamSqlEnv sqlEnv) throws java.lang.Exception
compileBeamPipeline
translate a SQL statement to executed as Beam data flow,
which is linked with the given pipeline
. The final output stream is returned as
PCollection
so more operations can be applied.java.lang.Exception
public BeamRelNode convertToBeamRel(java.lang.String sqlStatement) throws ValidationException, RelConversionException, SqlParseException
BeamRelNode
tree.ValidationException
RelConversionException
SqlParseException
public java.util.Map<java.lang.String,BeamSqlTable> getSourceTables()
public Planner getPlanner()