wuchong commented on a change in pull request #10823: 
[FLINK-15497][table-planner-blink] Reduce outputs when rank number is not 
required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#discussion_r365803632
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/operators/rank/RetractableTopNFunctionTest.java
 ##########
 @@ -209,12 +301,12 @@ public void testDisableGenerateRetraction() throws 
Exception {
                List<Object> expectedOutput = new ArrayList<>();
                expectedOutput.add(record("book", 1L, 12));
                expectedOutput.add(record("book", 2L, 19));
-               expectedOutput.add(record("book", 1L, 12));
                expectedOutput.add(record("book", 4L, 11));
+               expectedOutput.add(deleteRecord("book", 2L, 19));
 
 Review comment:
   We should emit delete/retract record first, then emit accumulate record. 
Otherwise, there might be some problems, e.g. user may see instantly incorrect 
results (top3 but see top4 at some point of time).
   

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