You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2023/01/04 10:52:12 UTC

[GitHub] [inlong] healchow commented on a diff in pull request #7107: [INLONG-7103][Sort] Support InLongMsg format in Kafka

healchow commented on code in PR #7107:
URL: https://github.com/apache/inlong/pull/7107#discussion_r1061359464


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/extract/KafkaExtractNode.java:
##########
@@ -142,7 +145,13 @@ public Map<String, String> tableOptions() {
         Map<String, String> options = super.tableOptions();
         options.put(KafkaConstant.TOPIC, topic);
         options.put(KafkaConstant.PROPERTIES_BOOTSTRAP_SERVERS, bootstrapServers);
-        if (format instanceof JsonFormat || format instanceof AvroFormat || format instanceof CsvFormat) {
+
+        boolean wrapWithInlongMsg = format instanceof InLongMsgFormat;
+        Format realFormat = wrapWithInlongMsg ? ((InLongMsgFormat) format).getInnerFormat() : format;
+
+        if (realFormat instanceof JsonFormat

Review Comment:
   What formats need special treatment? Is there a standard?



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org