Class BaseView

java.lang.Object
org.apache.iceberg.view.BaseView
All Implemented Interfaces:
Serializable, View

public class BaseView extends Object implements View, Serializable
See Also:
  • Constructor Details

  • Method Details

    • name

      public String name()
      Specified by:
      name in interface View
    • operations

      public ViewOperations operations()
    • schema

      public Schema schema()
      Description copied from interface: View
      Return the schema for this view.
      Specified by:
      schema in interface View
      Returns:
      this table's schema
    • schemas

      public Map<Integer,Schema> schemas()
      Description copied from interface: View
      Return a map of schema for this view.
      Specified by:
      schemas in interface View
      Returns:
      this table's schema map
    • 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 interface View
      Returns:
      the current view version.
    • versions

      public Iterable<ViewVersion> versions()
      Description copied from interface: View
      Get the versions of this view.
      Specified by:
      versions in interface View
      Returns:
      an Iterable of versions of this view.
    • version

      public ViewVersion version(int versionId)
      Description copied from interface: View
      Get a version in this view by ID.
      Specified by:
      version in interface View
      Parameters:
      versionId - version ID
      Returns:
      a version, or null if the ID cannot be found
    • history

      public List<ViewHistoryEntry> history()
      Description copied from interface: View
      Get the version history of this table.
      Specified by:
      history in interface View
      Returns:
      a list of ViewHistoryEntry
    • properties

      public Map<String,String> properties()
      Description copied from interface: View
      Return a map of string properties for this view.
      Specified by:
      properties in interface View
      Returns:
      this view's properties map
    • location

      public String location()
      Description copied from interface: View
      Return the view's base location.
      Specified by:
      location in interface View
      Returns:
      this view's location
    • updateProperties

      public UpdateViewProperties updateProperties()
      Description copied from interface: View
      Create a new UpdateViewProperties to update view properties.
      Specified by:
      updateProperties in interface View
      Returns:
      a new UpdateViewProperties
    • replaceVersion

      public ReplaceViewVersion replaceVersion()
      Description copied from interface: View
      Create a new ReplaceViewVersion to replace the view's current version.
      Specified by:
      replaceVersion in interface View
      Returns:
      a new ReplaceViewVersion
    • updateLocation

      public UpdateLocation updateLocation()
      Description copied from interface: View
      Create a new UpdateLocation to set the view's location.
      Specified by:
      updateLocation in interface View
      Returns:
      a new UpdateLocation
    • uuid

      public UUID uuid()
      Description copied from interface: View
      Returns the view's UUID
      Specified by:
      uuid in interface View
      Returns:
      the view's UUID
    • sqlFor

      public SQLViewRepresentation sqlFor(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.
      Specified by:
      sqlFor in interface View
      Returns:
      the view representation for the given SQL dialect, or null if no representation could be resolved