shouweikun opened a new pull request #13789: URL: https://github.com/apache/flink/pull/13789
…n blink planner ## What is the purpose of the change - Implement `ParallelismProvider` for sink in blink planner - `SinkFunctionProvider` and `OutputFormatProvider` work with `ParallelismProvider` by implementing `ParallelismProvider` - Prepare for the future work that make all the classes that implements `SinkRuntimeProvider` currently using in all kind of existing connectors implement `ParallelismProvider` in order to configure the sink parallelism ## Brief change log - `CommonPhysicalSink` : get parallelism from `ParallelismProvider` if possible and configure the sink parallelism into sink transformation after validation - `SinkFunctionProvider`: implements `ParallelismProvider`, add factory method to work with parameter called **parallelism** to set the specified sink parallelism - `OutputFormatProvider`: implements `ParallelismProvider`, add factory method to work with parameter called **parallelism** to set the specified sink parallelism - Add necessary tests and helper class for testing the new code mentioned above ## Verifying this change This change added tests and can be verified as follows: - Add helper class `InternalDataStreamSinkProviderWithParallelism` for the convenience of testing `DataStreamSinkProvider` working with `ParallelismProvider` - Add new field: `@Nullable` parallelism in `TestValuesTableSink` for the test related to `ParallelismProvider` in sink - Exception is expected if `DataStreamSinkProvider` work with `ParallelismProvider` - Test `SinkFunctionProvider` working with `ParallelismProvider` - Test `OutputFormatProvider` working with `ParallelismProvider` ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (yes / *no*) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (*yes* / no) - The serializers: (yes / *no* / don't know) - The runtime per-record code paths (performance sensitive): (yes /*no* / don't know) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / *no* / don't know) - The S3 file system connector: (yes / *no* / don't know) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org