Interface MetadataCatalog

All Known Implementing Classes:
NullMetadataCatalog

public interface MetadataCatalog
Client view of the metadata catalog. Implementations can be local (with the DB on the same node), or remote (if the DB is on another node.) Any caching that is desired is done behind this interface.

This interface does not interpolate physical data from segments. That work is done by a layer on top of this one: a layer which also has visibility to the segment caching logic.

  • Method Details

    • getTable

      @Nullable TableMetadata getTable(TableId tableId)
      Resolves a table given a TableId with the schema and table name. Does not do security checks: the caller is responsible.
      Returns:
      the table metadata, if any exists, else null if no metadata is available. Note that a datasource can exist without metadata. Views and input sources exist only if their metadata exists. System tables never have metadata.
    • resolveTable

      @Nullable ResolvedTable resolveTable(TableId tableId)
    • tables

      List<TableMetadata> tables(String schemaName)
      List of tables defined within the given schema. Does not filter the tables by permissions: the caller is responsible for that.
      Parameters:
      schemaName -
      Returns:
    • tableNames

      Set<String> tableNames(String schemaName)