Package org.apache.beam.sdk.io.iceberg
Enum Class SchemaEvolutionOption
- All Implemented Interfaces:
Serializable,Comparable<SchemaEvolutionOption>,Constable
Kinds of table schema change
AddFiles may make so that a file's columns are covered by
the table schema. Evolution is all or nothing per file schema: a file schema needing a change
that is not allowed is incompatible; see SchemaEvolutionConfig.IncompatibleSchemaHandling
for what happens to its files. Pinned columns (SchemaEvolutionConfig.getRequiredColumns()) are never relaxed whatever the options.
The options constrain changes to columns the table already has when a window's schema commit starts (the whole input, in batch). A column that is new in that window takes the union of the window's file schemas: its type is the widest among them and it is optional (a pinned column is created required only when the transform creates the table), so two files that disagree about a new column never conflict with each other, only with the table.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdd columns present in files but absent from the table, as optional columns at every level (a pinned column is created required).Make a required table column optional when a file has nulls in it, carries no null-count statistics for it, or lacks it entirely (every row would read null).Widen a column's type (int to long, float to double, decimal precision) when a file needs it. -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaEvolutionOptionReturns the enum constant of this class with the specified name.static SchemaEvolutionOption[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALLOW_FIELD_ADDITION
Add columns present in files but absent from the table, as optional columns at every level (a pinned column is created required). Also lets this transform create a missing table from the union of the file schemas. -
ALLOW_FIELD_RELAXATION
Make a required table column optional when a file has nulls in it, carries no null-count statistics for it, or lacks it entirely (every row would read null). For a column outside lists and maps, a file whose footer proves zero nulls never triggers this, however its writer declared the column; under a list or map the declaration is taken as is. Relaxation is table-wide and permanent; pin the columns that must stay required. -
ALLOW_TYPE_PROMOTION
Widen a column's type (int to long, float to double, decimal precision) when a file needs it.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-