You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "tsreaper (via GitHub)" <gi...@apache.org> on 2023/04/20 08:31:03 UTC

[GitHub] [incubator-paimon] tsreaper opened a new pull request, #961: [flink][bug] Fix bug that running MySQL actions on existing tables throws schema unmatch exception

tsreaper opened a new pull request, #961:
URL: https://github.com/apache/incubator-paimon/pull/961

   ### Purpose
   
   This PR fixes #943.
   
   Currently, running MySQL actions on existing tables may throw schema unmatch exception, even if Paimon schema and MySQL schema actually match. This is because we use `UpdatedDataFieldsProcessFunction.canConvert` to check if the schema matches, but `UpdatedDataFieldsProcessFunction.canConvert` does not deal with the case when `oldType` and `newType` are equal.
   
   ### Tests
   
   * MySqlSyncTableActionITCase#testAllTypes
   
   ### API and Format 
   
   N/A
   
   ### Documentation
   
   N/A
   


-- 
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-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-paimon] JingsongLi commented on a diff in pull request #961: [flink][bug] Fix bug that running MySQL actions on existing tables throws schema unmatch exception

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #961:
URL: https://github.com/apache/incubator-paimon/pull/961#discussion_r1172274071


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/cdc/UpdatedDataFieldsProcessFunction.java:
##########
@@ -172,6 +172,10 @@ private void applySchemaChange(SchemaChange schemaChange) throws Exception {
             Arrays.asList(DataTypeRoot.FLOAT, DataTypeRoot.DOUBLE);
 
     public static ConvertAction canConvert(DataType oldType, DataType newType) {
+        if (oldType.equals(newType)) {

Review Comment:
   `equalsIgnoreNull`



-- 
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-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-paimon] JingsongLi merged pull request #961: [flink][bug] Fix bug that running MySQL actions on existing tables throws schema unmatch exception

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #961:
URL: https://github.com/apache/incubator-paimon/pull/961


-- 
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-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org