public class ZetaSQLQueryPlanner extends java.lang.Object implements QueryPlanner
QueryPlanner.Factory, QueryPlanner.QueryParameters
Modifier and Type | Field and Description |
---|---|
static QueryPlanner.Factory |
FACTORY |
Constructor and Description |
---|
ZetaSQLQueryPlanner(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.FrameworkConfig config) |
ZetaSQLQueryPlanner(JdbcConnection jdbcConnection,
java.util.Collection<org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.RuleSet> ruleSets)
Called by
BeamSqlEnv .instantiatePlanner()
reflectively. |
Modifier and Type | Method and Description |
---|---|
BeamRelNode |
convertToBeamRel(java.lang.String sqlStatement) |
BeamRelNode |
convertToBeamRel(java.lang.String sqlStatement,
java.util.List<com.google.zetasql.Value> queryParams) |
BeamRelNode |
convertToBeamRel(java.lang.String sqlStatement,
java.util.Map<java.lang.String,com.google.zetasql.Value> queryParams) |
BeamRelNode |
convertToBeamRel(java.lang.String sqlStatement,
QueryPlanner.QueryParameters queryParameters)
It parses and validate the input query, then convert into a
BeamRelNode tree. |
java.lang.String |
getDefaultTimezone() |
static com.google.zetasql.LanguageOptions |
getLanguageOptions() |
static java.util.Collection<org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.RuleSet> |
getZetaSqlRuleSets() |
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.SqlNode |
parse(java.lang.String sqlStatement)
Parse input SQL query, and return a
SqlNode as grammar tree. |
void |
setDefaultTimezone(java.lang.String timezone) |
public static final QueryPlanner.Factory FACTORY
public ZetaSQLQueryPlanner(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.FrameworkConfig config)
public ZetaSQLQueryPlanner(JdbcConnection jdbcConnection, java.util.Collection<org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.RuleSet> ruleSets)
BeamSqlEnv
.instantiatePlanner()
reflectively.public static java.util.Collection<org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.tools.RuleSet> getZetaSqlRuleSets()
public java.lang.String getDefaultTimezone()
public void setDefaultTimezone(java.lang.String timezone)
public static com.google.zetasql.LanguageOptions getLanguageOptions()
public BeamRelNode convertToBeamRel(java.lang.String sqlStatement)
public BeamRelNode convertToBeamRel(java.lang.String sqlStatement, java.util.Map<java.lang.String,com.google.zetasql.Value> queryParams) throws ParseException, SqlConversionException
ParseException
SqlConversionException
public BeamRelNode convertToBeamRel(java.lang.String sqlStatement, java.util.List<com.google.zetasql.Value> queryParams) throws ParseException, SqlConversionException
ParseException
SqlConversionException
public BeamRelNode convertToBeamRel(java.lang.String sqlStatement, QueryPlanner.QueryParameters queryParameters) throws ParseException, SqlConversionException
QueryPlanner
BeamRelNode
tree.convertToBeamRel
in interface QueryPlanner
ParseException
SqlConversionException
public org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.SqlNode parse(java.lang.String sqlStatement) throws ParseException
QueryPlanner
SqlNode
as grammar tree.parse
in interface QueryPlanner
ParseException