twalthr commented on a change in pull request #13802:
URL: https://github.com/apache/flink/pull/13802#discussion_r512633303
##########
File path: flink-core/src/main/java/org/apache/flink/types/Row.java
##########
@@ -294,15 +295,24 @@ public static boolean deepEquals(Row row1, Row row2) {
/**
* Compares two {@link List}s of {@link Row} for deep equality. This
method supports all conversion
- * classes of the table ecosystem.
+ * classes of the table ecosystem. The top-level lists can be compared
with or without order.
*
* <p>The current implementation of {@link Row#equals(Object)} is not
able to compare all deeply
* nested row structures that might be created in the table ecosystem.
For example, it does not
* support comparing arrays stored in the values of a map. We might
update the {@link #equals(Object)}
* with this implementation in future versions.
*/
- public static boolean deepEquals(List<Row> l1, List<Row> l2) {
- return deepEqualsInternal(l1, l2);
+ public static boolean deepEquals(List<Row> l1, List<Row> l2, boolean
ignoreOrder) {
Review comment:
I was also thinking about this, but I wanted to give users an official
API that allows for simple testing for comparing rows. I will see what I can do.
----------------------------------------------------------------
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]