Class EvolveSchemaVisitor

java.lang.Object
org.apache.iceberg.schema.SchemaWithPartnerVisitor<Integer,Boolean>
org.apache.iceberg.flink.sink.dynamic.EvolveSchemaVisitor

public class EvolveSchemaVisitor extends SchemaWithPartnerVisitor<Integer,Boolean>
Visitor class that accumulates the set of changes needed to evolve an existing schema into the target schema. Changes are applied to an UpdateSchema operation.

We support:

  • Adding new columns
  • Widening the type of existing columsn
  • Reordering columns
  • Dropping columns (when dropUnusedColumns is enabled)
We don't support:
  • Renaming columns
By default, any columns present in the table but absent from the input schema are marked as optional to prevent issues caused by late or out-of-order data. If dropUnusedColumns is enabled, these columns are removed instead to ensure a strict one-to-one schema alignment.