Package org.apache.iceberg.catalog
Class BaseViewSessionCatalog.AsViewCatalog
java.lang.Object
org.apache.iceberg.catalog.BaseViewSessionCatalog.AsViewCatalog
- All Implemented Interfaces:
ViewCatalog
- Enclosing class:
- BaseViewSessionCatalog
-
Method Summary
Modifier and TypeMethodDescriptionbuildView
(TableIdentifier identifier) Instantiate a builder to create or replace a SQL view.boolean
dropView
(TableIdentifier identifier) Drop a view.void
initialize
(String name, Map<String, String> properties) Initialize a view catalog given a custom name and a map of catalog properties.void
invalidateView
(TableIdentifier identifier) Invalidate cached view metadata from current catalog.Return all the identifiers under this namespace.loadView
(TableIdentifier identifier) Load a view.name()
Return the name for this catalog.void
renameView
(TableIdentifier from, TableIdentifier to) Rename a view.boolean
viewExists
(TableIdentifier identifier) Check whether view exists.
-
Method Details
-
name
Description copied from interface:ViewCatalog
Return the name for this catalog.- Specified by:
name
in interfaceViewCatalog
- Returns:
- this catalog's name
-
listViews
Description copied from interface:ViewCatalog
Return all the identifiers under this namespace.- Specified by:
listViews
in interfaceViewCatalog
- Parameters:
namespace
- a namespace- Returns:
- a list of identifiers for views
-
loadView
Description copied from interface:ViewCatalog
Load a view.- Specified by:
loadView
in interfaceViewCatalog
- Parameters:
identifier
- a view identifier- Returns:
- instance of
View
implementation referred by the identifier
-
viewExists
Description copied from interface:ViewCatalog
Check whether view exists.- Specified by:
viewExists
in interfaceViewCatalog
- Parameters:
identifier
- a view identifier- Returns:
- true if the view exists, false otherwise
-
buildView
Description copied from interface:ViewCatalog
Instantiate a builder to create or replace a SQL view.- Specified by:
buildView
in interfaceViewCatalog
- Parameters:
identifier
- a view identifier- Returns:
- a view builder
-
dropView
Description copied from interface:ViewCatalog
Drop a view.- Specified by:
dropView
in interfaceViewCatalog
- Parameters:
identifier
- a view identifier- Returns:
- true if the view was dropped, false if the view did not exist
-
renameView
Description copied from interface:ViewCatalog
Rename a view.- Specified by:
renameView
in interfaceViewCatalog
- Parameters:
from
- identifier of the view to renameto
- new view identifier
-
invalidateView
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 interfaceViewCatalog
- Parameters:
identifier
- a view identifier
-
initialize
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 interfaceViewCatalog
- Parameters:
name
- a custom name for the catalogproperties
- catalog properties
-