matriv opened a new pull request #17811:
URL: https://github.com/apache/flink/pull/17811
## What is the purpose of the change
Certain Flink sinks, i.e. RDBMs will not accept rows where there are string
values which length exceeds the `precision` defined for the corresponding
column type, (e.g. `VARCHAR(20)`). Previously, there was no check in place, and
such records would simply cause errors, possibly bringing down the whole
pipeline.
## Brief change log
- Create a new `ConstraintValidator` operator that implements the existing
NOT NULL constraint for sinks
- Implement the new CHAR/VARCHAR length validator inside this new operator
## Verifying this change
Added
`org.apache.flink.table.planner.runtime.stream.table.TableSinkITCase#testCharPrecisionEnforcer`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): **YES**
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? docs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]