kyzheng196 commented on code in PR #3569:
URL: https://github.com/apache/flink-cdc/pull/3569#discussion_r1738700470


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/main/java/org/apache/flink/cdc/connectors/paimon/sink/PaimonMetadataApplier.java:
##########
@@ -160,15 +156,24 @@ private void applyCreateTable(CreateTableEvent event) 
throws SchemaEvolveExcepti
                     .forEach(
                             (column) ->
                                     builder.column(
-                                            column.getName(),
+                                            column.getName().toLowerCase(),
                                             LogicalTypeConversion.toDataType(
                                                     
DataTypeUtils.toFlinkDataType(column.getType())
                                                             
.getLogicalType())));
-            builder.primaryKey(schema.primaryKeys().toArray(new String[0]));
+            
builder.primaryKey(schema.primaryKeys().toString().toLowerCase().replaceAll("\\[|]",
 ""));

Review Comment:
   Hi yanquan, I've tried `String.join`, but if the table has only one primary 
key `[col1]`, then the result of `String.join("[col1]")` will be `""`, primary 
key will be empty. So I think `replaceAll` can be better?



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

Reply via email to