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 2022/07/31 08:11:29 UTC

[GitHub] [inlong] haibo-duan commented on a diff in pull request #5280: [INLONG-5279][Manager] Optimize the creation code of databases and tables

haibo-duan commented on code in PR #5280:
URL: https://github.com/apache/inlong/pull/5280#discussion_r933945637


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/mysql/MySQLResourceOperator.java:
##########
@@ -85,53 +85,33 @@ private void createTable(SinkInfo sinkInfo) {
         // set columns
         List<MySQLColumnInfo> columnList = new ArrayList<>();
         for (StreamSinkFieldEntity field : fieldList) {
-            MySQLColumnInfo columnInfo = new MySQLColumnInfo();
-            columnInfo.setName(field.getFieldName());
-            columnInfo.setType(field.getFieldType());
-            columnInfo.setComment(field.getFieldComment());
+            MySQLColumnInfo columnInfo = new MySQLColumnInfo(field.getFieldName(), field.getFieldType(),
+                    field.getFieldComment());
             columnList.add(columnInfo);
         }
 
         MySQLSinkDTO mySQLSink = MySQLSinkDTO.getFromJson(sinkInfo.getExtParams());
         MySQLTableInfo tableInfo = MySQLSinkDTO.getTableInfo(mySQLSink, columnList);
-        String url = mySQLSink.getJdbcUrl();

Review Comment:
   Its a good idea.



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