wuchong commented on a change in pull request #12130:
URL: https://github.com/apache/flink/pull/12130#discussion_r424853834
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/GenericArrayData.java
##########
@@ -132,6 +135,25 @@ public boolean isNullAt(int pos) {
return !isPrimitiveArray && ((Object[]) array)[pos] == null;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenericArrayData that = (GenericArrayData) o;
+ return size == that.size &&
+ isPrimitiveArray == that.isPrimitiveArray &&
+ Arrays.deepEquals(new Object[] {array}, new
Object[]{that.array});
Review comment:
Yes. I think we need that. `GenericRowData` may contains `byte[]` which
should use `Arrays.deepEquals`.
----------------------------------------------------------------
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]