xuyangzhong commented on code in PR #27117:
URL: https://github.com/apache/flink/pull/27117#discussion_r2480292208


##########
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/test/program/SinkTestStep.java:
##########
@@ -108,16 +116,40 @@ public List<String> getExpectedAfterRestoreAsStrings() {
     }
 
     public List<String> getExpectedAsStrings() {
-        final List<String> data = new 
ArrayList<>(getExpectedBeforeRestoreAsStrings());
-        data.addAll(getExpectedAfterRestoreAsStrings());
-        return data;
+        if (hasStringsSet() || deduplicatedFieldIndices == null) {
+            final List<String> data = new 
ArrayList<>(getExpectedBeforeRestoreAsStrings());
+            data.addAll(getExpectedAfterRestoreAsStrings());
+            return data;
+        }
+        Preconditions.checkState(hasRowsSet());
+        final List<Row> data = new ArrayList<>();
+        if (expectedBeforeRestore != null) {
+            data.addAll(expectedBeforeRestore);
+        }
+        if (expectedAfterRestore != null) {
+            data.addAll(expectedAfterRestore);
+        }
+
+        Map<List<Object>, Row> deduplicatedMap = new HashMap<>();

Review Comment:
   Currently, for `expectedBeforeRestoreStrings` and 
`expectedAfterRestoreStrings`, which have transformed each row into a string 
and lost their schema, it is not possible to deduplicate them by column. 
(Perhaps one way to handle this is by removing the leading and trailing 
parentheses and splitting the strings by commas). 
   However, for now, there is no need to support this in string scenarios for 
test, so I haven't implemented it yet.



-- 
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]

Reply via email to