JingsongLi commented on a change in pull request #13789:
URL: https://github.com/apache/flink/pull/13789#discussion_r513151741
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/connector/sink/OutputFormatProvider.java
##########
@@ -20,19 +20,39 @@
import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.api.common.io.OutputFormat;
+import org.apache.flink.table.connector.ParallelismProvider;
import org.apache.flink.table.data.RowData;
+import java.util.Optional;
+
/**
* Provider of an {@link OutputFormat} instance as a runtime implementation
for {@link DynamicTableSink}.
*/
@PublicEvolving
-public interface OutputFormatProvider extends
DynamicTableSink.SinkRuntimeProvider {
+public interface OutputFormatProvider extends
DynamicTableSink.SinkRuntimeProvider, ParallelismProvider{
/**
* Helper method for creating a static provider.
*/
static OutputFormatProvider of(OutputFormat<RowData> outputFormat) {
- return () -> outputFormat;
+ return of(outputFormat, Optional.empty());
+ }
+
+ /**
+ * Helper method for creating a static provider, sink parallelism will
be configured if non-empty parallelism is passed in.
+ */
+ static OutputFormatProvider of(OutputFormat<RowData> outputFormat,
Optional<Integer> parallelism) {
Review comment:
ditto
----------------------------------------------------------------
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:
[email protected]