pizhihui commented on code in PR #1287: URL: https://github.com/apache/incubator-paimon/pull/1287#discussion_r1217958955
########## paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/cdc/mysql/Expression.java: ########## @@ -136,6 +155,90 @@ public String eval(String input) { } } + /** Compute month from a time input. */ + final class MonthComputer implements Expression { + + private static final long serialVersionUID = 1L; + + private final String fieldReference; + + private MonthComputer(String fieldReference) { + this.fieldReference = fieldReference; + } + + @Override + public String fieldReference() { + return fieldReference; + } + + @Override + public DataType outputType() { + return DataTypes.INT(); + } + + @Override + public String eval(String input) { + LocalDateTime localDateTime = DateTimeUtils.toLocalDateTime(input, 0); Review Comment: 1. Thanks for your hint,I used previous code. 2. Flink `DateTimeUtils.parseTimestampData` is linked to FLINK-14925, What I understand is that it needs to be consistent with Flink,So what's the best we can do. -- 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...@paimon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org