fsk119 commented on a change in pull request #14246:
URL: https://github.com/apache/flink/pull/14246#discussion_r537352456
##########
File path:
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaOptions.java
##########
@@ -314,12 +317,12 @@ private static void
validateScanStartupMode(ReadableConfig tableOptions) {
private static void validateSinkPartitioner(ReadableConfig
tableOptions) {
tableOptions.getOptional(SINK_PARTITIONER)
.ifPresent(partitioner -> {
- if
(!SINK_PARTITIONER_ENUMS.contains(partitioner.toLowerCase())) {
- if (partitioner.isEmpty()) {
- throw new
ValidationException(
-
String.format("Option '%s' should be a non-empty string.",
-
SINK_PARTITIONER.key()));
- }
+ if
(partitioner.equals(SINK_PARTITIONER_VALUE_ROUND_ROBIN) &&
tableOptions.getOptional(KEY_FIELDS).isPresent()) {
Review comment:
It's hard to check here because users may input the class name as
user-defined partitioner.
----------------------------------------------------------------
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]