Package org.apache.iceberg.view
Class BaseView
- java.lang.Object
-
- org.apache.iceberg.view.BaseView
-
- All Implemented Interfaces:
java.io.Serializable,View
public class BaseView extends java.lang.Object implements View, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BaseView(ViewOperations ops, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ViewVersioncurrentVersion()Get the current version for this view, or null if there are no versions.java.util.List<ViewHistoryEntry>history()Get the version history of this table.java.lang.Stringlocation()Return the view's base location.java.lang.Stringname()ViewOperationsoperations()java.util.Map<java.lang.String,java.lang.String>properties()Return a map of string properties for this view.ReplaceViewVersionreplaceVersion()Create a newReplaceViewVersionto replace the view's current version.Schemaschema()Return theschemafor this view.java.util.Map<java.lang.Integer,Schema>schemas()Return a map ofschemafor this view.SQLViewRepresentationsqlFor(java.lang.String dialect)This implementation of sqlFor will resolve what is considered the "closest" dialect.UpdateLocationupdateLocation()Create a newUpdateLocationto set the view's location.UpdateViewPropertiesupdateProperties()Create a newUpdateViewPropertiesto update view properties.java.util.UUIDuuid()Returns the view's UUIDViewVersionversion(int versionId)Get a version in this view by ID.java.lang.Iterable<ViewVersion>versions()Get the versions of this view.
-
-
-
Constructor Detail
-
BaseView
public BaseView(ViewOperations ops, java.lang.String name)
-
-
Method Detail
-
operations
public ViewOperations operations()
-
schema
public Schema schema()
Description copied from interface:ViewReturn theschemafor this view.
-
schemas
public java.util.Map<java.lang.Integer,Schema> schemas()
Description copied from interface:ViewReturn a map ofschemafor this view.
-
currentVersion
public ViewVersion currentVersion()
Description copied from interface:ViewGet the current version for this view, or null if there are no versions.- Specified by:
currentVersionin interfaceView- Returns:
- the current view version.
-
versions
public java.lang.Iterable<ViewVersion> versions()
Description copied from interface:ViewGet the versions of this view.
-
version
public ViewVersion version(int versionId)
Description copied from interface:ViewGet a version in this view by ID.
-
history
public java.util.List<ViewHistoryEntry> history()
Description copied from interface:ViewGet the version history of this table.- Specified by:
historyin interfaceView- Returns:
- a list of
ViewHistoryEntry
-
properties
public java.util.Map<java.lang.String,java.lang.String> properties()
Description copied from interface:ViewReturn a map of string properties for this view.- Specified by:
propertiesin interfaceView- Returns:
- this view's properties map
-
location
public java.lang.String location()
Description copied from interface:ViewReturn the view's base location.
-
updateProperties
public UpdateViewProperties updateProperties()
Description copied from interface:ViewCreate a newUpdateViewPropertiesto update view properties.- Specified by:
updatePropertiesin interfaceView- Returns:
- a new
UpdateViewProperties
-
replaceVersion
public ReplaceViewVersion replaceVersion()
Description copied from interface:ViewCreate a newReplaceViewVersionto replace the view's current version.- Specified by:
replaceVersionin interfaceView- Returns:
- a new
ReplaceViewVersion
-
updateLocation
public UpdateLocation updateLocation()
Description copied from interface:ViewCreate a newUpdateLocationto set the view's location.- Specified by:
updateLocationin interfaceView- Returns:
- a new
UpdateLocation
-
uuid
public java.util.UUID uuid()
Description copied from interface:ViewReturns the view's UUID
-
sqlFor
public SQLViewRepresentation sqlFor(java.lang.String dialect)
This implementation of sqlFor will resolve what is considered the "closest" dialect. If an exact match is found, then that is returned. Otherwise, the first representation would be returned. If no SQL representation is found, null is returned.
-
-