IcebergTableSynchronizer

@Singleton
class IcebergTableSynchronizer(comparator: IcebergTypesComparator, superTypeFinder: IcebergSuperTypeFinder)

Applies schema changes to an Iceberg Table, including nested columns (struct fields).

Supports:

  • Adding new columns (possibly nested).

  • Removing top-level columns.

  • Updating types (finding a supertype).

  • Marking columns newly optional.

Constructors

Link copied to clipboard
constructor(comparator: IcebergTypesComparator, superTypeFinder: IcebergSuperTypeFinder)

Functions

Link copied to clipboard
fun maybeApplySchemaChanges(table: Table, incomingSchema: Schema, columnTypeChangeBehavior: ColumnTypeChangeBehavior, requireSeparateCommitsForColumnReplace: Boolean = false): SchemaUpdateResult

Compare table's current schema with incomingSchema and apply changes as needed: