You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/14 09:34:53 UTC

[GitHub] [flink] wuchong commented on a change in pull request #8736: [FLINK-12846][table] Carry primary key and unique key information in TableSchema

wuchong commented on a change in pull request #8736: [FLINK-12846][table] Carry primary key and unique key information in TableSchema
URL: https://github.com/apache/flink/pull/8736#discussion_r293733091
 
 

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java
 ##########
 @@ -244,13 +305,17 @@ public boolean equals(Object o) {
 		}
 		TableSchema schema = (TableSchema) o;
 		return Arrays.equals(fieldNames, schema.fieldNames) &&
-			Arrays.equals(fieldDataTypes, schema.fieldDataTypes);
+			Arrays.equals(fieldDataTypes, schema.fieldDataTypes) &&
+			Arrays.equals(primaryKey, schema.primaryKey) &&
+			Arrays.equals(uniqueKeys, schema.uniqueKeys);
 
 Review comment:
   Good catch! I also change the hashcode to `Arrays.deepHashCode`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services