Package org.apache.iceberg.catalog
Class BaseViewSessionCatalog.AsViewCatalog
- java.lang.Object
-
- org.apache.iceberg.catalog.BaseViewSessionCatalog.AsViewCatalog
-
- All Implemented Interfaces:
ViewCatalog
- Enclosing class:
- BaseViewSessionCatalog
public class BaseViewSessionCatalog.AsViewCatalog extends java.lang.Object implements ViewCatalog
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ViewBuilderbuildView(TableIdentifier identifier)Instantiate a builder to create or replace a SQL view.booleandropView(TableIdentifier identifier)Drop a view.voidinitialize(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)Initialize a view catalog given a custom name and a map of catalog properties.voidinvalidateView(TableIdentifier identifier)Invalidate cached view metadata from current catalog.java.util.List<TableIdentifier>listViews(Namespace namespace)Return all the identifiers under this namespace.ViewloadView(TableIdentifier identifier)Load a view.java.lang.Stringname()Return the name for this catalog.voidrenameView(TableIdentifier from, TableIdentifier to)Rename a view.booleanviewExists(TableIdentifier identifier)Check whether view exists.
-
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:ViewCatalogReturn the name for this catalog.- Specified by:
namein interfaceViewCatalog- Returns:
- this catalog's name
-
listViews
public java.util.List<TableIdentifier> listViews(Namespace namespace)
Description copied from interface:ViewCatalogReturn all the identifiers under this namespace.- Specified by:
listViewsin interfaceViewCatalog- Parameters:
namespace- a namespace- Returns:
- a list of identifiers for views
-
loadView
public View loadView(TableIdentifier identifier)
Description copied from interface:ViewCatalogLoad a view.- Specified by:
loadViewin interfaceViewCatalog- Parameters:
identifier- a view identifier- Returns:
- instance of
Viewimplementation referred by the identifier
-
viewExists
public boolean viewExists(TableIdentifier identifier)
Description copied from interface:ViewCatalogCheck whether view exists.- Specified by:
viewExistsin interfaceViewCatalog- Parameters:
identifier- a view identifier- Returns:
- true if the view exists, false otherwise
-
buildView
public ViewBuilder buildView(TableIdentifier identifier)
Description copied from interface:ViewCatalogInstantiate a builder to create or replace a SQL view.- Specified by:
buildViewin interfaceViewCatalog- Parameters:
identifier- a view identifier- Returns:
- a view builder
-
dropView
public boolean dropView(TableIdentifier identifier)
Description copied from interface:ViewCatalogDrop a view.- Specified by:
dropViewin interfaceViewCatalog- Parameters:
identifier- a view identifier- Returns:
- true if the view was dropped, false if the view did not exist
-
renameView
public void renameView(TableIdentifier from, TableIdentifier to)
Description copied from interface:ViewCatalogRename a view.- Specified by:
renameViewin interfaceViewCatalog- Parameters:
from- identifier of the view to renameto- new view identifier
-
invalidateView
public void invalidateView(TableIdentifier identifier)
Description copied from interface:ViewCatalogInvalidate 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:
invalidateViewin interfaceViewCatalog- 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:ViewCatalogInitialize 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:
initializein interfaceViewCatalog- Parameters:
name- a custom name for the catalogproperties- catalog properties
-
-