fsk119 commented on code in PR #25864:
URL: https://github.com/apache/flink/pull/25864#discussion_r1900571175


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/factories/TestValuesTableFactory.java:
##########
@@ -1883,6 +1892,26 @@ public LookupRuntimeProvider 
getLookupRuntimeProvider(LookupContext context) {
             }
         }
 
+        private List<Row> deduplicateDataByPk(List<Row> data) {
+            if (primaryKeyIndices.length == 0) {
+                return data;
+            }
+            // <pk, data>
+            LinkedHashMap<Row, Row> pkMap = new LinkedHashMap<>();
+            for (Row row : data) {
+                pkMap.put(extractPk(row), row);

Review Comment:
   Do we need to check rowkind here? If the rowkind is DELETE, should we remove 
the row from the map?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to