public interface SqlEngine
| Modifier and Type | Method and Description |
|---|---|
QueryMaker |
buildQueryMakerForInsert(String targetDataSource,
org.apache.calcite.rel.RelRoot relRoot,
PlannerContext plannerContext)
Create a
QueryMaker for an INSERT ... |
QueryMaker |
buildQueryMakerForSelect(org.apache.calcite.rel.RelRoot relRoot,
PlannerContext plannerContext)
Create a
QueryMaker for a SELECT query. |
boolean |
feature(EngineFeature feature,
PlannerContext plannerContext)
Whether a feature applies to this engine or not.
|
String |
name()
Name of this engine.
|
org.apache.calcite.rel.type.RelDataType |
resultTypeForInsert(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
org.apache.calcite.rel.type.RelDataType validatedRowType)
SQL row type that would be emitted by the
QueryMaker from buildQueryMakerForInsert(java.lang.String, org.apache.calcite.rel.RelRoot, org.apache.druid.sql.calcite.planner.PlannerContext). |
org.apache.calcite.rel.type.RelDataType |
resultTypeForSelect(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
org.apache.calcite.rel.type.RelDataType validatedRowType)
SQL row type that would be emitted by the
QueryMaker from buildQueryMakerForSelect(org.apache.calcite.rel.RelRoot, org.apache.druid.sql.calcite.planner.PlannerContext). |
void |
validateContext(QueryContext queryContext)
Validates a provided query context.
|
String name()
boolean feature(EngineFeature feature, PlannerContext plannerContext)
void validateContext(QueryContext queryContext) throws org.apache.calcite.tools.ValidationException
ValidationException
if the context has a problem.org.apache.calcite.tools.ValidationExceptionorg.apache.calcite.rel.type.RelDataType resultTypeForSelect(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
org.apache.calcite.rel.type.RelDataType validatedRowType)
QueryMaker from buildQueryMakerForSelect(org.apache.calcite.rel.RelRoot, org.apache.druid.sql.calcite.planner.PlannerContext).
Called for SELECT. Not called for EXPLAIN, which is handled by the planner itself.typeFactory - type factoryvalidatedRowType - row type from Calcite's validatororg.apache.calcite.rel.type.RelDataType resultTypeForInsert(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
org.apache.calcite.rel.type.RelDataType validatedRowType)
QueryMaker from buildQueryMakerForInsert(java.lang.String, org.apache.calcite.rel.RelRoot, org.apache.druid.sql.calcite.planner.PlannerContext).
Called for INSERT and REPLACE. Not called for EXPLAIN, which is handled by the planner itself.typeFactory - type factoryvalidatedRowType - row type from Calcite's validatorQueryMaker buildQueryMakerForSelect(org.apache.calcite.rel.RelRoot relRoot, PlannerContext plannerContext) throws org.apache.calcite.tools.ValidationException
QueryMaker for a SELECT query.relRoot - planned and validated relplannerContext - context for this queryorg.apache.calcite.tools.ValidationException - if this engine cannot build an executor for the provided queryQueryMaker buildQueryMakerForInsert(String targetDataSource, org.apache.calcite.rel.RelRoot relRoot, PlannerContext plannerContext) throws org.apache.calcite.tools.ValidationException
QueryMaker for an INSERT ... SELECT query.targetDataSource - datasource for the INSERT portion of the queryrelRoot - planned and validated rel for the SELECT portion of the queryplannerContext - context for this queryorg.apache.calcite.tools.ValidationException - if this engine cannot build an executor for the provided queryCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.