Class SqlNodeToOperationConversion


  • public class SqlNodeToOperationConversion
    extends Object
    Mix-in tool class for SqlNode that allows DDL commands to be converted to Operation.

    For every kind of SqlNode, there needs to have a corresponding #convert(type) method, the 'type' argument should be the subclass of the supported SqlNode.

    Every #convert() should return a Operation which can be used in Planner.

    • Method Detail

      • convert

        public static Optional<Operation> convert​(org.apache.flink.table.planner.calcite.FlinkPlannerImpl flinkPlanner,
                                                  CatalogManager catalogManager,
                                                  org.apache.calcite.sql.SqlNode sqlNode)
        This is the main entrance for executing all kinds of DDL/DML SqlNodes, different SqlNode will have it's implementation in the #convert(type) method whose 'type' argument is subclass of SqlNode.
        Parameters:
        flinkPlanner - FlinkPlannerImpl to convertCreateTable sql node to rel node
        catalogManager - CatalogManager to resolve full path for operations
        sqlNode - SqlNode to execute on