Interface CatalogTable

    • Method Detail

      • of

        static CatalogTable of​(Schema schema,
                               @Nullable
                               String comment,
                               List<String> partitionKeys,
                               Map<String,​String> options)
        Creates a basic implementation of this interface.

        The signature is similar to a SQL CREATE TABLE statement.

        Parameters:
        schema - unresolved schema
        comment - optional comment
        partitionKeys - list of partition keys or an empty list if not partitioned
        options - options to configure the connector
      • of

        static CatalogTable of​(Schema schema,
                               @Nullable
                               String comment,
                               List<String> partitionKeys,
                               Map<String,​String> options,
                               @Nullable
                               Long snapshot)
        Creates an instance of CatalogTable with a specific snapshot.
        Parameters:
        schema - unresolved schema
        comment - optional comment
        partitionKeys - list of partition keys or an empty list if not partitioned
        options - options to configure the connector
        snapshot - table snapshot of the table
      • fromProperties

        static CatalogTable fromProperties​(Map<String,​String> properties)
        Creates an instance of CatalogTable from a map of string properties that were previously created with ResolvedCatalogTable.toProperties().

        Note that the serialization and deserialization of catalog tables are not symmetric. The framework will resolve functions and perform other validation tasks. A catalog implementation must not deal with this during a read operation.

        Parameters:
        properties - serialized version of a CatalogTable that includes schema, partition keys, and connector options
      • isPartitioned

        boolean isPartitioned()
        Check if the table is partitioned or not.
        Returns:
        true if the table is partitioned; otherwise, false
      • getPartitionKeys

        List<String> getPartitionKeys()
        Get the partition keys of the table. This will be an empty set if the table is not partitioned.
        Returns:
        partition keys of the table
      • copy

        CatalogTable copy​(Map<String,​String> options)
        Returns a copy of this CatalogTable with given table options options.
        Returns:
        a new copy of this table with replaced table options
      • getSnapshot

        default Optional<Long> getSnapshot()
        Return the snapshot specified for the table. Return Optional.empty() if not specified.