wuchong commented on a change in pull request #10096: [FLINK-14623][table-api] 
Add computed column information into TableSc…
URL: https://github.com/apache/flink/pull/10096#discussion_r343118760
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableSchema.java
 ##########
 @@ -271,47 +277,17 @@ public boolean equals(Object o) {
                        return false;
                }
                TableSchema schema = (TableSchema) o;
-               return Arrays.equals(fieldNames, schema.fieldNames) &&
-                       Arrays.equals(fieldDataTypes, schema.fieldDataTypes) &&
-                       watermarkSpecs.equals(schema.getWatermarkSpecs());
+               return Objects.equals(columns, schema.columns)
+                       && Objects.equals(watermarkSpecs, 
schema.getWatermarkSpecs());
        }
 
        @Override
        public int hashCode() {
-               int result = Arrays.hashCode(fieldNames);
-               result = 31 * result + Arrays.hashCode(fieldDataTypes);
+               int result = Objects.hash(columns);
 
 Review comment:
   You can just `return Objects.hash(columns, watermarkSpecs);`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to