yuxiqian commented on code in PR #3636: URL: https://github.com/apache/flink-cdc/pull/3636#discussion_r1797533354
########## flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/schema/SchemaOperator.java: ########## @@ -609,6 +643,34 @@ public Object getFieldOrNull(RecordData recordData) { + "Currently only CHAR / VARCHAR can be accepted by a STRING column", originalField.getClass()))); } + } else if (destinationType.is(DataTypeRoot.TIME_WITHOUT_TIME_ZONE) + && originalType.is(DataTypeRoot.TIME_WITHOUT_TIME_ZONE)) { + Integer value = (Integer) originalField; + int precisionDifference = + ((TimeType) originalType).getPrecision() + - ((TimeType) destinationType).getPrecision(); + if (precisionDifference > 0) { + return value / (int) Math.pow(10, precisionDifference); + } else if (precisionDifference < 0) { + return value * (int) Math.pow(10, -precisionDifference); + } else { + return value; + } Review Comment: Agree that `TIME` precision is a different issue and could be dealt with in another PR. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org