Class BaseViewSessionCatalog.AsViewCatalog

    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: ViewCatalog
        Return the name for this catalog.
        Specified by:
        name in interface ViewCatalog
        Returns:
        this catalog's name
      • listViews

        public java.util.List<TableIdentifier> listViews​(Namespace namespace)
        Description copied from interface: ViewCatalog
        Return all the identifiers under this namespace.
        Specified by:
        listViews in interface ViewCatalog
        Parameters:
        namespace - a namespace
        Returns:
        a list of identifiers for views
      • loadView

        public View loadView​(TableIdentifier identifier)
        Description copied from interface: ViewCatalog
        Load a view.
        Specified by:
        loadView in interface ViewCatalog
        Parameters:
        identifier - a view identifier
        Returns:
        instance of View implementation referred by the identifier
      • viewExists

        public boolean viewExists​(TableIdentifier identifier)
        Description copied from interface: ViewCatalog
        Check whether view exists.
        Specified by:
        viewExists in interface ViewCatalog
        Parameters:
        identifier - a view identifier
        Returns:
        true if the view exists, false otherwise
      • buildView

        public ViewBuilder buildView​(TableIdentifier identifier)
        Description copied from interface: ViewCatalog
        Instantiate a builder to create or replace a SQL view.
        Specified by:
        buildView in interface ViewCatalog
        Parameters:
        identifier - a view identifier
        Returns:
        a view builder
      • dropView

        public boolean dropView​(TableIdentifier identifier)
        Description copied from interface: ViewCatalog
        Drop a view.
        Specified by:
        dropView in interface ViewCatalog
        Parameters:
        identifier - a view identifier
        Returns:
        true if the view was dropped, false if the view did not exist
      • invalidateView

        public void invalidateView​(TableIdentifier identifier)
        Description copied from interface: ViewCatalog
        Invalidate cached view metadata from current catalog.

        If the view is already loaded or cached, drop cached data. If the view does not exist or is not cached, do nothing.

        Specified by:
        invalidateView in interface ViewCatalog
        Parameters:
        identifier - a view identifier
      • initialize

        public void initialize​(java.lang.String name,
                               java.util.Map<java.lang.String,​java.lang.String> properties)
        Description copied from interface: ViewCatalog
        Initialize a view catalog given a custom name and a map of catalog properties.

        A custom view catalog implementation must have a no-arg constructor. A compute engine like Spark or Flink will first initialize the catalog without any arguments, and then call this method to complete catalog initialization with properties passed into the engine.

        Specified by:
        initialize in interface ViewCatalog
        Parameters:
        name - a custom name for the catalog
        properties - catalog properties