Mrart commented on code in PR #4060:
URL: https://github.com/apache/flink-cdc/pull/4060#discussion_r2292502386


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-debezium/src/main/java/org/apache/flink/cdc/debezium/event/DebeziumEventDeserializationSchema.java:
##########
@@ -284,22 +286,22 @@ protected Object convertToFloat(Object dbzObj, Schema 
schema) {
     }
 
     protected Object convertToDate(Object dbzObj, Schema schema) {
-        return (int) TemporalConversions.toLocalDate(dbzObj).toEpochDay();
+        return DateData.fromLocalDate(TemporalConversions.toLocalDate(dbzObj));
     }
 
     protected Object convertToTime(Object dbzObj, Schema schema) {
         if (dbzObj instanceof Long) {
             switch (schema.name()) {
                 case MicroTime.SCHEMA_NAME:
-                    return (int) ((long) dbzObj / 1000);
+                    return TimeData.fromNanoOfDay((long) dbzObj * 1000);

Review Comment:
   It's possible to use these schemes in other places as well, so that you 
don't have to x*1000 everywhere, which will reduce the number of low-level 
errors when writing code



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