JingsongLi commented on code in PR #237:
URL: https://github.com/apache/flink-table-store/pull/237#discussion_r929555403
##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/UpdateSchema.java:
##########
@@ -80,6 +83,33 @@ public String comment() {
return comment;
}
+ private RowType validateRowType(
+ RowType rowType, List<String> primaryKeys, List<String>
partitionKeys) {
+ if (primaryKeys.isEmpty()) {
+ return rowType;
+ }
+ Set<String> pkSet = new HashSet<>(primaryKeys);
+ Preconditions.checkState(
+ pkSet.containsAll(partitionKeys),
+ String.format(
+ "Primary key constraint %s should include all
partition fields %s",
+ primaryKeys, partitionKeys));
+ // primary key should not nullable
Review Comment:
Add a check fields contains all pk and partitionKeys
--
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]