Package io.deephaven.iceberg.util
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classThis is a wrapper aroundSchemathat provides equality based onsameSchemaAndId(Schema, Schema).static final classstatic final classstatic enumstatic enumstatic interface -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaProvider.TableSchemaUse the current schema from the table.static SchemaProvider.TableSnapshotUse the schema from the current snapshot of the table.static SchemaProvider.DirectSchemafromSchema(org.apache.iceberg.Schema schema) Use the given schema directly.static SchemaProvider.SchemaIdfromSchemaId(int id) Use the schema with the given ID from the table.static SchemaProvider.SnapshotIdfromSnapshotId(long snapshotId) Use the schema from the snapshot with the given ID.static booleansameSchemaAndId(org.apache.iceberg.Schema schema, org.apache.iceberg.Schema other) Provides a stricter version ofSchema.sameSchema(Schema)that also checks for equality of theschema ids.<T> Twalk(SchemaProvider.Visitor<T> visitor)
-
Method Details
-
fromCurrent
Use the current schema from the table. -
fromSchemaId
Use the schema with the given ID from the table. -
fromSchema
Use the given schema directly. -
fromSnapshotId
Use the schema from the snapshot with the given ID. -
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 ofSchema.sameSchema(Schema)that also checks for equality of theschema ids.- Parameters:
schema- the first Schemaother- the second Schema- Returns:
- if the Schemas are the same and have equal ids
-
walk
-