zhengshubin opened a new issue, #1020: URL: https://github.com/apache/incubator-paimon/issues/1020
### Search before asking - [X] I searched in the [issues](https://github.com/apache/incubator-paimon/issues) and found nothing similar. ### Paimon version paimon 0.4-snapshot flink 1.16.1 mysql 8.0.27 ### Compute Engine flink ### Minimal reproduce step I have a column c9 , type is DATETIME (without precision) . When I had add column : alter table cdc_test add c12 INT, It had made error: ERROR Caused by: java.lang.UnsupportedOperationException: Cannot convert field c9 from type TIMESTAMP(0) to TIMESTAMP(6) at org.apache.paimon.flink.sink.cdc.UpdatedDataFieldsProcessFunction.applySchemaChange(UpdatedDataFieldsProcessFunction.java:146) at org.apache.paimon.flink.sink.cdc.UpdatedDataFieldsProcessFunction.processElement(UpdatedDataFieldsProcessFunction.java:66) at org.apache.paimon.flink.sink.cdc.UpdatedDataFieldsProcessFunction.processElement(UpdatedDataFieldsProcessFunction.java:50) I had locationed that column c9 in table schema is TIMESTAMP(0) ,but in updatedDataFields is TIMESTAMP(6) ### What doesn't meet your expectations? 1111 ### Anything else? MySqlTypeUtils.toDataType: private static final int JDBC_TIMESTAMP_BASE_LENGTH = 19; case DATETIME: case TIMESTAMP: if (length == null) { return DataTypes.TIMESTAMP(); } else if (length >= JDBC_TIMESTAMP_BASE_LENGTH) { if (length > JDBC_TIMESTAMP_BASE_LENGTH + 1) { // Timestamp with a fraction of seconds. // For example "2023-03-23 17:20:00.01". // The decimal point will occupy 1 character. return DataTypes.TIMESTAMP(length - JDBC_TIMESTAMP_BASE_LENGTH - 1); } else { return DataTypes.TIMESTAMP(0); } in mysql schema length is 19 , in updatedDataFields length is null . ### Are you willing to submit a PR? - [ ] I'm willing to submit a 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
