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


##########
inlong-sort/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/table/DorisDynamicTableSink.java:
##########
@@ -86,30 +84,30 @@ public ChangelogMode getChangelogMode(ChangelogMode 
changelogMode) {
     @SuppressWarnings({"unchecked"})
     @Override
     public SinkRuntimeProvider getSinkRuntimeProvider(Context context) {
-        if (!multipleSink) {
-            DorisDynamicOutputFormat.Builder builder = 
DorisDynamicOutputFormat.builder()
-                    .setFenodes(options.getFenodes())
-                    .setUsername(options.getUsername())
-                    .setPassword(options.getPassword())
-                    .setTableIdentifier(options.getTableIdentifier())
-                    .setReadOptions(readOptions)
-                    .setExecutionOptions(executionOptions)
-                    .setFieldDataTypes(tableSchema.getFieldDataTypes())
-                    .setFieldNames(tableSchema.getFieldNames());
-            return OutputFormatProvider.of(builder.build());
-        }
         DorisDynamicSchemaOutputFormat.Builder builder = 
DorisDynamicSchemaOutputFormat.builder()
                 .setFenodes(options.getFenodes())
                 .setUsername(options.getUsername())
                 .setPassword(options.getPassword())
                 .setReadOptions(readOptions)
                 .setExecutionOptions(executionOptions)
-                .setDatabasePattern(databasePattern)
-                .setTablePattern(tablePattern)
-                .setDynamicSchemaFormat(sinkMultipleFormat)
-                .setIgnoreSingleTableErrors(ignoreSingleTableErrors)
                 .setInlongMetric(inlongMetric)
                 .setAuditHostAndPorts(auditHostAndPorts);
+
+        if (!multipleSink) {

Review Comment:
   代码不精简,另外存在逻辑错误。



##########
inlong-sort/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/table/DorisDynamicSchemaOutputFormat.java:
##########
@@ -159,8 +265,24 @@ public void open(int taskNumber, int numTasks) throws 
IOException {
                 options.getUsername(),
                 options.getPassword(),
                 executionOptions.getStreamLoadProp());
-        jsonDynamicSchemaFormat = (JsonDynamicSchemaFormat)
-                DynamicSchemaFormatFactory.getFormat(dynamicSchemaFormat);
+        // Only support dynamic topic when the topicPattern is specified

Review Comment:
   The log error?



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