public class ZetaSQLQueryPlanner extends java.lang.Object implements QueryPlanner
QueryPlanner.Factory, QueryPlanner.QueryParameters
Modifier and Type | Field and Description |
---|---|
static java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.plan.RelOptRule> |
DEFAULT_CALC |
static QueryPlanner.Factory |
FACTORY |
Constructor and Description |
---|
ZetaSQLQueryPlanner(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.tools.FrameworkConfig config) |
ZetaSQLQueryPlanner(JdbcConnection jdbcConnection,
java.util.Collection<org.apache.beam.vendor.calcite.v1_28_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_28_0.org.apache.calcite.tools.RuleSet> |
getZetaSqlRuleSets() |
static java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.tools.RuleSet> |
getZetaSqlRuleSets(java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.plan.RelOptRule> calc) |
org.apache.beam.vendor.calcite.v1_28_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 java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.plan.RelOptRule> DEFAULT_CALC
public static final QueryPlanner.Factory FACTORY
public ZetaSQLQueryPlanner(org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.tools.FrameworkConfig config)
public ZetaSQLQueryPlanner(JdbcConnection jdbcConnection, java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.tools.RuleSet> ruleSets)
BeamSqlEnv
.instantiatePlanner()
reflectively.public static java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.tools.RuleSet> getZetaSqlRuleSets()
public static java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.tools.RuleSet> getZetaSqlRuleSets(java.util.Collection<org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.plan.RelOptRule> calc)
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_28_0.org.apache.calcite.sql.SqlNode parse(java.lang.String sqlStatement) throws ParseException
QueryPlanner
SqlNode
as grammar tree.parse
in interface QueryPlanner
ParseException