Class ConstraintEnforcer.Builder
java.lang.Object
org.apache.flink.table.runtime.operators.sink.ConstraintEnforcer.Builder
- Enclosing class:
- ConstraintEnforcer
Helper builder, so that the
ConstraintEnforcer 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBinaryLengthConstraint(org.apache.flink.table.api.config.ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> binaryFieldInfo, List<String> binaryFieldNames, String[] allFieldNames) voidaddCharLengthConstraint(org.apache.flink.table.api.config.ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> charFieldInfo, List<String> charFieldNames, String[] allFieldNames) voidaddNotNullConstraint(org.apache.flink.table.api.config.ExecutionConfigOptions.NotNullEnforcer notNullEnforcer, int[] notNullFieldIndices, List<String> notNullFieldNames, String[] allFieldNames) build()If neither of NOT NULL or CHAR/VARCHAR length or BINARY/VARBINARY enforcers are configured, null is returned.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addNotNullConstraint
-
addCharLengthConstraint
public void addCharLengthConstraint(org.apache.flink.table.api.config.ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> charFieldInfo, List<String> charFieldNames, String[] allFieldNames) -
addBinaryLengthConstraint
public void addBinaryLengthConstraint(org.apache.flink.table.api.config.ExecutionConfigOptions.TypeLengthEnforcer typeLengthEnforcer, List<ConstraintEnforcer.FieldInfo> binaryFieldInfo, List<String> binaryFieldNames, String[] allFieldNames) -
build
If neither of NOT NULL or CHAR/VARCHAR length or BINARY/VARBINARY enforcers are configured, null is returned.
-