[ 
https://issues.apache.org/jira/browse/FLINK-23142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jingsong Lee updated FLINK-23142:
---------------------------------
    Description: 
See {{UpdatableTopNFunctionTest.testSortKeyChangesWhenOutputRankNumber}} 
{code:java}
expectedOutput.add(updateBeforeRecord("book", 3L, 16, 1L));
expectedOutput.add(updateAfterRecord("book", 2L, 11, 1L));
expectedOutput.add(updateBeforeRecord("book", 2L, 19, 2L));
expectedOutput.add(updateAfterRecord("book", 3L, 16, 2L));
{code}
It should collect the third record and then collect the second record.

This wrong order will lead to the wrong implementation of the downstream, 
because the records expected by the downstream has unique key, but the disorder 
here will lead to the data being deleted by mistake.

  was:
See {{UpdatableTopNFunctionTest.testSortKeyChangesWhenOutputRankNumber}} 
{code:java}
expectedOutput.add(updateBeforeRecord("book", 3L, 16, 1L));
expectedOutput.add(updateAfterRecord("book", 2L, 11, 1L));
expectedOutput.add(updateBeforeRecord("book", 2L, 19, 2L));
expectedOutput.add(updateAfterRecord("book", 3L, 16, 2L));
{code}
It should collect the third record and then collect the second record.


> UpdatableTopNFunction output wrong order in the same unique key
> ---------------------------------------------------------------
>
>                 Key: FLINK-23142
>                 URL: https://issues.apache.org/jira/browse/FLINK-23142
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Jingsong Lee
>            Priority: Critical
>             Fix For: 1.14.0
>
>
> See {{UpdatableTopNFunctionTest.testSortKeyChangesWhenOutputRankNumber}} 
> {code:java}
> expectedOutput.add(updateBeforeRecord("book", 3L, 16, 1L));
> expectedOutput.add(updateAfterRecord("book", 2L, 11, 1L));
> expectedOutput.add(updateBeforeRecord("book", 2L, 19, 2L));
> expectedOutput.add(updateAfterRecord("book", 3L, 16, 2L));
> {code}
> It should collect the third record and then collect the second record.
> This wrong order will lead to the wrong implementation of the downstream, 
> because the records expected by the downstream has unique key, but the 
> disorder here will lead to the data being deleted by mistake.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to