JNSimba commented on code in PR #443:
URL: 
https://github.com/apache/doris-flink-connector/pull/443#discussion_r1690705222


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/mysql/DateToStringConverter.java:
##########
@@ -47,26 +48,42 @@ public class DateToStringConverter implements 
CustomConverter<SchemaBuilder, Rel
     public static final Properties DEFAULT_PROPS = new Properties();
 
     static {
-        DEFAULT_PROPS.setProperty("converters", "date");
+        DEFAULT_PROPS.setProperty(DatabaseSyncConfig.CONVERTERS, 
DatabaseSyncConfig.DATE);
         DEFAULT_PROPS.setProperty(
-                "date.type", 
"org.apache.doris.flink.tools.cdc.mysql.DateToStringConverter");
-        DEFAULT_PROPS.setProperty("date.format.date", "yyyy-MM-dd");
-        DEFAULT_PROPS.setProperty("date.format.datetime", "yyyy-MM-dd 
HH:mm:ss.SSSSSS");
-        DEFAULT_PROPS.setProperty("date.format.timestamp", "yyyy-MM-dd 
HH:mm:ss.SSSSSS");
-        DEFAULT_PROPS.setProperty("date.format.timestamp.zone", "UTC+8");
+                DatabaseSyncConfig.DATE_TYPE,
+                
"org.apache.doris.flink.tools.cdc.mysql.DateToStringConverter");
+        DEFAULT_PROPS.setProperty(
+                DatabaseSyncConfig.DATE_FORMAT_DATE, 
DatabaseSyncConfig.YEAR_MONTH_DAY_FORMAT);
+        DEFAULT_PROPS.setProperty(
+                DatabaseSyncConfig.DATE_FORMAT_DATETIME, 
DatabaseSyncConfig.DATETIME_MICRO_FORMAT);
+        DEFAULT_PROPS.setProperty(
+                DatabaseSyncConfig.DATE_FORMAT_TIMESTAMP, 
DatabaseSyncConfig.DATETIME_MICRO_FORMAT);
+        DEFAULT_PROPS.setProperty(
+                DatabaseSyncConfig.DATE_FORMAT_TIMESTAMP_ZONE, 
DatabaseSyncConfig.TIME_ZONE_UTC_8);

Review Comment:
   If it is only used here, I think it is better to define it inside this 
convert class



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to