Interface SchemaProvider

All Known Implementing Classes:
SchemaProvider.DirectSchema, SchemaProvider.SchemaId, SchemaProvider.SnapshotId, SchemaProvider.TableSchema, SchemaProvider.TableSnapshot

public interface SchemaProvider
A specification for extracting the schema from a table.
  • Method Details

    • fromCurrent

      static SchemaProvider.TableSchema fromCurrent()
      Use the current schema from the table.
    • fromSchemaId

      static SchemaProvider.SchemaId fromSchemaId(int id)
      Use the schema with the given ID from the table.
    • fromSchema

      static SchemaProvider.DirectSchema fromSchema(org.apache.iceberg.Schema schema)
      Use the given schema directly.
    • fromSnapshotId

      static SchemaProvider.SnapshotId fromSnapshotId(long snapshotId)
      Use the schema from the snapshot with the given ID.
    • fromCurrentSnapshot

      static SchemaProvider.TableSnapshot fromCurrentSnapshot()
      Use the schema from the current snapshot of the table.
    • sameSchemaAndId

      static boolean sameSchemaAndId(org.apache.iceberg.Schema schema, org.apache.iceberg.Schema other)
      Provides a stricter version of Schema.sameSchema(Schema) that also checks for equality of the schema ids.
      Parameters:
      schema - the first Schema
      other - the second Schema
      Returns:
      if the Schemas are the same and have equal ids
    • walk

      <T> T walk(SchemaProvider.Visitor<T> visitor)