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

[GitHub] [incubator-paimon] yuzelin commented on a diff in pull request #977: [hotfix] improve error message when constructing MySqlSchema

yuzelin commented on code in PR #977:
URL: https://github.com/apache/incubator-paimon/pull/977#discussion_r1174494795


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSchema.java:
##########
@@ -63,10 +66,15 @@ public MySqlSchema(
                     scale = null;
                 }
                 if (!caseSensitive) {
+                    if (fields.containsKey(fieldName.toLowerCase())) {
+                        LOG.warn(
+                                "Duplicate key '{}' appears in table '{}.{}' when converting fields map keys "
+                                        + "to case-insensitive form. This may cause error.",
+                                fieldName,
+                                databaseName,
+                                originalTableName);
+                    }
                     fieldName = fieldName.toLowerCase();

Review Comment:
   I want to retain original `fieldName` in error message.



-- 
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