lvyanquan commented on code in PR #3791:
URL: https://github.com/apache/flink-cdc/pull/3791#discussion_r1976804957


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-kafka/src/main/java/org/apache/flink/cdc/connectors/kafka/sink/KafkaDataSinkFactory.java:
##########
@@ -72,9 +74,15 @@ public DataSink createDataSink(Context context) {
                 
KeySerializationFactory.createSerializationSchema(configuration, keyFormat, 
zoneId);
         JsonSerializationType jsonSerializationType =
                 
context.getFactoryConfiguration().get(KafkaDataSinkOptions.VALUE_FORMAT);
+        Boolean isIncludedDebeziumSchema =
+                
context.getFactoryConfiguration().get(SINK_DEBEZIUM_JSON_SCHEMA_ENABLED);
+        Preconditions.checkArgument(
+                !(isIncludedDebeziumSchema
+                        && 
!jsonSerializationType.equals(JsonSerializationType.DEBEZIUM_JSON)),
+                "sink.debezium_json_schema.enabled only supported 
debezium-json.");

Review Comment:
   We can move the check to 
ChangeLogJsonFormatFactory.createSerializationSchema method.



-- 
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]

Reply via email to