zjureel commented on code in PR #383:
URL: https://github.com/apache/flink-table-store/pull/383#discussion_r1024702921
##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -157,6 +159,33 @@ public TableSchema commitNewVersion(UpdateSchema
updateSchema) throws Exception
}
}
+ private void validatePrimaryKeysType(UpdateSchema updateSchema,
List<String> primaryKeys) {
+ if (!primaryKeys.isEmpty()) {
+ Map<String, RowType.RowField> rowFields = new HashMap<>();
+ for (RowType.RowField rowField :
updateSchema.rowType().getFields()) {
+ rowFields.put(StringUtils.lowerCase(rowField.getName()),
rowField);
Review Comment:
I will remove `lowCase` here.
But in fact there's a problem of the up/lowCase of table and column names.
The ddl syntax between table store and spark/hive are different. The table
and column name of spark/hive are case-insensitive, while in table store with
flink, the table name is case-insensitive and column name is case-sensitive.
I think we need to verify the duplicate table/column names in the table
store to be case-insensitive to avoid confusion for the users. Then we can
also use lowercase uniformly for comparison when doing some additional
verification. What do you think?
--
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]