zhangjun0x01 commented on code in PR #547:
URL: https://github.com/apache/flink-table-store/pull/547#discussion_r1118773693
##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -123,6 +123,40 @@ public TableSchema createTable(Schema schema) throws
Exception {
Map<String, String> options = schema.options();
int highestFieldId = RowType.currentHighestFieldId(fields);
+ List<String> columnNames =
+
schema.fields().stream().map(DataField::name).collect(Collectors.toList());
+ if (options.containsKey(CoreOptions.PRIMARY_KEY.key())) {
+ if (!primaryKeys.isEmpty()) {
Review Comment:
I tried to move the validation to `SchemaValidation#validateTableSchema`,
but I found that the main function of the method is to validate , but we need
to modify the values of partition and primary-key, so I think
`SchemaManager#createTable` is more appropriate, what do you think about?
--
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]