Class CatalogSourceTable

java.lang.Object
org.apache.calcite.prepare.Prepare.AbstractPreparingTable
org.apache.flink.table.planner.plan.schema.FlinkPreparingTableBase
org.apache.flink.table.planner.plan.schema.CatalogSourceTable
All Implemented Interfaces:
org.apache.calcite.plan.RelOptTable, org.apache.calcite.prepare.Prepare.PreparingTable, org.apache.calcite.schema.Wrapper, org.apache.calcite.sql.validate.SqlValidatorTable

public final class CatalogSourceTable extends FlinkPreparingTableBase
A FlinkPreparingTableBase implementation which defines the interfaces required to translate the Calcite RelOptTable to the Flink specific TableSourceTable.

This table is only used to translate the CatalogTable into TableSourceTable during the last phase of the SQL-to-rel conversion, it is not necessary anymore once the SQL node was converted to a relational expression.

  • Constructor Details

    • CatalogSourceTable

      public CatalogSourceTable(org.apache.calcite.plan.RelOptSchema relOptSchema, List<String> names, org.apache.calcite.rel.type.RelDataType rowType, CatalogSchemaTable schemaTable)
  • Method Details

    • createAnonymous

      public static CatalogSourceTable createAnonymous(FlinkRelBuilder relBuilder, org.apache.flink.table.catalog.ContextResolvedTable contextResolvedTable, boolean isBatchMode)
      Create a CatalogSourceTable from an anonymous ContextResolvedTable. This is required to manually create a preparing table skipping the calcite catalog resolution.
    • toRel

      public org.apache.calcite.rel.RelNode toRel(org.apache.calcite.plan.RelOptTable.ToRelContext toRelContext)
      Specified by:
      toRel in interface org.apache.calcite.plan.RelOptTable
      Overrides:
      toRel in class FlinkPreparingTableBase
    • getCatalogTable

      public org.apache.flink.table.catalog.CatalogTable getCatalogTable()