Class ContextResolvedTable


  • @Internal
    public final class ContextResolvedTable
    extends Object
    This class contains information about a table, its ResolvedSchema, its options and its relationship with a Catalog, if any.

    There can be 3 kinds of ContextResolvedTable:

    • A permanent table: a table which is stored in a Catalog and has an associated unique ObjectIdentifier.
    • A temporary table: a table which is stored in the CatalogManager, has an associated unique ObjectIdentifier and is flagged as temporary.
    • An anonymous/inline table: a table which is not stored in a catalog and doesn't have an associated unique ObjectIdentifier.

    The different handling of temporary and permanent tables is Catalog and CatalogManager instance specific, hence for these two kind of tables, an instance of this object represents the relationship between the specific ResolvedCatalogBaseTable instance and the specific Catalog/CatalogManager instances. For example, the same ResolvedCatalogBaseTable can be temporary for one catalog, but permanent for another one.

    • Method Detail

      • permanent

        public static ContextResolvedTable permanent​(org.apache.flink.table.catalog.ObjectIdentifier identifier,
                                                     org.apache.flink.table.catalog.Catalog catalog,
                                                     org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
      • temporary

        public static ContextResolvedTable temporary​(org.apache.flink.table.catalog.ObjectIdentifier identifier,
                                                     org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
      • anonymous

        public static ContextResolvedTable anonymous​(org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
      • anonymous

        public static ContextResolvedTable anonymous​(String hint,
                                                     org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
      • isAnonymous

        public boolean isAnonymous()
      • isTemporary

        public boolean isTemporary()
        Returns:
        true if the table is temporary. An anonymous table is always temporary.
      • isPermanent

        public boolean isPermanent()
      • getIdentifier

        public org.apache.flink.table.catalog.ObjectIdentifier getIdentifier()
      • getCatalog

        public Optional<org.apache.flink.table.catalog.Catalog> getCatalog()
        Returns empty if isPermanent() is false.
      • getResolvedTable

        public <T extends org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?>> T getResolvedTable()
        Returns a fully resolved catalog object.
      • getResolvedSchema

        public org.apache.flink.table.catalog.ResolvedSchema getResolvedSchema()
      • getTable

        public <T extends org.apache.flink.table.catalog.CatalogBaseTable> T getTable()
        Returns the original metadata object returned by the catalog.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object