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


##########
inlong-sort/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/DynamicKafkaSerializationSchema.java:
##########
@@ -176,6 +189,17 @@ public void setPartitions(int[] partitions) {
 
     @Override
     public String getTargetTopic(RowData element) {
+        // Only support dynamic topic when the topicPattern is specified
+        //      and the valueSerialization is RawFormatSerializationSchema
+        if (valueSerialization instanceof RawFormatSerializationSchema && 
StringUtils.isNotBlank(topicPattern)) {
+            try {
+                return 
DynamicSchemaFormatFactory.getFormat(innerValueDecodingFormat)
+                        .parse(element.getBinary(0), topicPattern);

Review Comment:
   It is ok, but it is determined by the raw format(The Raw format allows to 
read and write raw (byte based) values as a single 
column(https://nightlies.apache.org/flink/flink-docs-release-1.13/docs/connectors/table/formats/raw/).)



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