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 ViewVersion
currentVersion()
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.String
location()
Return the view's base location.java.lang.String
name()
ViewOperations
operations()
java.util.Map<java.lang.String,java.lang.String>
properties()
Return a map of string properties for this view.ReplaceViewVersion
replaceVersion()
Create a newReplaceViewVersion
to replace the view's current version.Schema
schema()
Return theschema
for this view.java.util.Map<java.lang.Integer,Schema>
schemas()
Return a map ofschema
for this view.SQLViewRepresentation
sqlFor(java.lang.String dialect)
This implementation of sqlFor will resolve what is considered the "closest" dialect.UpdateLocation
updateLocation()
Create a newUpdateLocation
to set the view's location.UpdateViewProperties
updateProperties()
Create a newUpdateViewProperties
to update view properties.java.util.UUID
uuid()
Returns the view's UUIDViewVersion
version(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:View
Return theschema
for this view.
-
schemas
public java.util.Map<java.lang.Integer,Schema> schemas()
Description copied from interface:View
Return a map ofschema
for this view.
-
currentVersion
public ViewVersion currentVersion()
Description copied from interface:View
Get the current version for this view, or null if there are no versions.- Specified by:
currentVersion
in interfaceView
- Returns:
- the current view version.
-
versions
public java.lang.Iterable<ViewVersion> versions()
Description copied from interface:View
Get the versions of this view.
-
version
public ViewVersion version(int versionId)
Description copied from interface:View
Get a version in this view by ID.
-
history
public java.util.List<ViewHistoryEntry> history()
Description copied from interface:View
Get the version history of this table.- Specified by:
history
in interfaceView
- Returns:
- a list of
ViewHistoryEntry
-
properties
public java.util.Map<java.lang.String,java.lang.String> properties()
Description copied from interface:View
Return a map of string properties for this view.- Specified by:
properties
in interfaceView
- Returns:
- this view's properties map
-
location
public java.lang.String location()
Description copied from interface:View
Return the view's base location.
-
updateProperties
public UpdateViewProperties updateProperties()
Description copied from interface:View
Create a newUpdateViewProperties
to update view properties.- Specified by:
updateProperties
in interfaceView
- Returns:
- a new
UpdateViewProperties
-
replaceVersion
public ReplaceViewVersion replaceVersion()
Description copied from interface:View
Create a newReplaceViewVersion
to replace the view's current version.- Specified by:
replaceVersion
in interfaceView
- Returns:
- a new
ReplaceViewVersion
-
updateLocation
public UpdateLocation updateLocation()
Description copied from interface:View
Create a newUpdateLocation
to set the view's location.- Specified by:
updateLocation
in interfaceView
- Returns:
- a new
UpdateLocation
-
uuid
public java.util.UUID uuid()
Description copied from interface:View
Returns 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.
-
-