Interface SqlNodeConverter<S extends org.apache.calcite.sql.SqlNode>

All Known Implementing Classes:
AbstractSqlShowConverter, SqlAlterCatalogCommentConverter, SqlAlterCatalogOptionsConverter, SqlAlterCatalogResetConverter, SqlAlterMaterializedTableAsQueryConverter, 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 convert SqlNode instance into Operation.

By default, a SqlNodeConverter only matches a specific SqlNode class to convert which is defined by the parameter type S. But a SqlNodeConverter can also match a set of SqlNodes with the SqlKind if it defines the supportedSqlKinds().

See Also:
  • Method Details

    • convertSqlNode

      org.apache.flink.table.operations.Operation convertSqlNode(S node, SqlNodeConverter.ConvertContext context)
      Convert the given validated SqlNode into an Operation.
      Parameters:
      node - a validated SqlNode.
      context - the utilities and context information to convert
    • supportedSqlKinds

      default Optional<EnumSet<org.apache.calcite.sql.SqlKind>> supportedSqlKinds()
      Returns the SqlKinds of SqlNodes that the SqlNodeConverter 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: