You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "yunqingmoswu (via GitHub)" <gi...@apache.org> on 2023/03/02 02:13:42 UTC

[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #7486: [INLONG-7485][Sort] Kafka extract node decide connector option by format

yunqingmoswu commented on code in PR #7486:
URL: https://github.com/apache/inlong/pull/7486#discussion_r1122529143


##########
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/extract/KafkaExtractNode.java:
##########
@@ -166,6 +169,21 @@ public Map<String, String> tableOptions() {
         return options;
     }
 
+    /**
+     * true is upsert kafka connector
+     * false is kafka connector
+     * @return connector option is
+     */
+    private boolean isUpsertKafkaConnector(Format format, boolean hasPrimaryKey) {
+        if (format instanceof JsonFormat && hasPrimaryKey) {

Review Comment:
   Maybe it is better implement by 'return hasPrimaryKey && (format instansof JsonFormat || format instansof ...);'



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