Interface SqlNodeConverter<S extends org.apache.calcite.sql.SqlNode>
-
- All Known Implementing Classes:
AbstractSqlShowConverter
,SqlAlterCatalogCommentConverter
,SqlAlterCatalogOptionsConverter
,SqlAlterCatalogResetConverter
,SqlAlterMaterializedTableRefreshConverter
,SqlAlterMaterializedTableResumeConverter
,SqlAlterMaterializedTableSuspendConverter
,SqlAlterTableAddPartitionConverter
,SqlAlterTableDropPartitionConverter
,SqlAlterViewAsConverter
,SqlAlterViewPropertiesConverter
,SqlAlterViewRenameConverter
,SqlCreateCatalogConverter
,SqlCreateMaterializedTableConverter
,SqlCreateViewConverter
,SqlDescribeCatalogConverter
,SqlDescribeFunctionConverter
,SqlDescribeJobConverter
,SqlDropMaterializedTableConverter
,SqlProcedureCallConverter
,SqlQueryConverter
,SqlReplaceTableAsConverter
,SqlShowCatalogsConverter
,SqlShowCreateCatalogConverter
,SqlShowDatabasesConverter
,SqlShowFunctionsConverter
,SqlShowPartitionsConverter
,SqlShowProcedureConverter
,SqlShowTablesConverter
,SqlShowViewsConverter
,SqlTruncateTableConverter
public interface SqlNodeConverter<S extends org.apache.calcite.sql.SqlNode>
A converter to convertSqlNode
instance intoOperation
.By default, a
SqlNodeConverter
only matches a specific SqlNode class to convert which is defined by the parameter typeS
. But aSqlNodeConverter
can also match a set of SqlNodes with theSqlKind
if it defines thesupportedSqlKinds()
.- See Also:
SqlNodeConverters
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SqlNodeConverter.ConvertContext
Context ofSqlNodeConverter
.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Operation
convertSqlNode(S node, SqlNodeConverter.ConvertContext context)
Convert the given validatedSqlNode
into anOperation
.default Optional<EnumSet<org.apache.calcite.sql.SqlKind>>
supportedSqlKinds()
-
-
-
Method Detail
-
convertSqlNode
Operation convertSqlNode(S node, SqlNodeConverter.ConvertContext context)
Convert the given validatedSqlNode
into anOperation
.- Parameters:
node
- a validatedSqlNode
.context
- the utilities and context information to convert
-
supportedSqlKinds
default Optional<EnumSet<org.apache.calcite.sql.SqlKind>> supportedSqlKinds()
Returns theSqlKinds
ofSqlNodes
that theSqlNodeConverter
supports to convert.If a
SqlNodeConverter
returns a non-empty SqlKinds, The conversion framework will find the corresponding converter by matching the SqlKind of SqlNode instead of the class of SqlNode- See Also:
SqlQueryConverter
-
-