aiwenmo commented on code in PR #3636: URL: https://github.com/apache/flink-cdc/pull/3636#discussion_r1797537900
########## flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/schema/SchemaOperator.java: ########## @@ -624,4 +672,21 @@ public void snapshotState(StateSnapshotContext context) throws Exception { // Needless to do anything, since AbstractStreamOperator#snapshotState and #processElement // is guaranteed not to be mixed together. } + + private static TimestampData castToTimestamp(Object object, String timezone) { + if (object == null) { + return null; + } + if (object instanceof LocalZonedTimestampData) { + return TimestampData.fromLocalDateTime( + LocalDateTime.ofInstant( + ((LocalZonedTimestampData) object).toInstant(), ZoneId.of(timezone))); + } else if (object instanceof ZonedTimestampData) { + return TimestampData.fromLocalDateTime( + LocalDateTime.ofInstant( + ((ZonedTimestampData) object).toInstant(), ZoneId.of(timezone))); + } else { + return TimestampData.fromLocalDateTime(LocalDateTime.parse(String.valueOf(object))); + } Review Comment: This code may never be executed. -- 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