hanwei996 commented on code in PR #2356:
URL:
https://github.com/apache/incubator-seatunnel/pull/2356#discussion_r938370011
##########
seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-kafka/src/main/java/org/apache/seatunnel/flink/kafka/source/KafkaTableStream.java:
##########
@@ -110,8 +110,19 @@ public void prepare(FlinkEnvironment env) {
}
}
String schemaContent = config.getString(SCHEMA);
- format =
FormatType.from(config.getString(SOURCE_FORMAT).trim().toLowerCase());
- schemaInfo = JsonUtils.parseArray(schemaContent);
+ String sourceFormat =
config.getString(SOURCE_FORMAT).trim().toLowerCase();
+ format = FormatType.from(sourceFormat);
+ switch (sourceFormat){
+ case "csv":
+ schemaInfo = JsonUtils.parseArray(schemaContent);
+ break;
+ case "json":
+ case "avro":
+ schemaInfo = JsonUtils.parseObject(schemaContent);
Review Comment:
@Hisoka-X The new PR has been submitted
--
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]