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


##########
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:
   Can you explain the purpose of the `replace` operation



##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/main/java/org/apache/flink/cdc/connectors/paimon/sink/PaimonMetadataApplier.java:
##########
@@ -44,11 +44,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;

Review Comment:
   Avoid using * when import class.



##########
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(),

Review Comment:
   Only when the metastore is `hive`, it is required to be in lowercase. 
   It is not necessary when the metastore is `filesystem`.



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