Class ConstraintEnforcer.Builder
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.sink.ConstraintEnforcer.Builder
-
- Enclosing class:
- ConstraintEnforcer
public static class ConstraintEnforcer.Builder extends Object
Helper builder, so that theConstraintEnforcer
can be instantiated with only the NOT NULL constraint validation, only the CHAR/VARCHAR length validation, only the BINARY/VARBINARY length validation or combinations of them, or all of them.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBinaryLengthConstraint(ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> binaryFieldInfo, List<String> binaryFieldNames, String[] allFieldNames)
void
addCharLengthConstraint(ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> charFieldInfo, List<String> charFieldNames, String[] allFieldNames)
void
addNotNullConstraint(ExecutionConfigOptions.NotNullEnforcer notNullEnforcer, int[] notNullFieldIndices, List<String> notNullFieldNames, String[] allFieldNames)
ConstraintEnforcer
build()
If neither of NOT NULL or CHAR/VARCHAR length or BINARY/VARBINARY enforcers are configured, null is returned.
-
-
-
Method Detail
-
addNotNullConstraint
public void addNotNullConstraint(ExecutionConfigOptions.NotNullEnforcer notNullEnforcer, int[] notNullFieldIndices, List<String> notNullFieldNames, String[] allFieldNames)
-
addCharLengthConstraint
public void addCharLengthConstraint(ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> charFieldInfo, List<String> charFieldNames, String[] allFieldNames)
-
addBinaryLengthConstraint
public void addBinaryLengthConstraint(ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> binaryFieldInfo, List<String> binaryFieldNames, String[] allFieldNames)
-
build
public ConstraintEnforcer build()
If neither of NOT NULL or CHAR/VARCHAR length or BINARY/VARBINARY enforcers are configured, null is returned.
-
-