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

Jark Wu closed FLINK-20271.
---------------------------
    Resolution: Fixed

Fixed in master (1.12.0): ebf5e08a03fcc7e8ba87d806e3eaad1e4e47d61d

> Fix ArrayIndexOutOfBounds for RetractableTopNFunction
> -----------------------------------------------------
>
>                 Key: FLINK-20271
>                 URL: https://issues.apache.org/jira/browse/FLINK-20271
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.11.0, 1.12.0
>            Reporter: Shengkai Fang
>            Assignee: Jark Wu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0
>
>
> We can get the bug by adding the case into the UnitTest 
> {{RetractableTopNFunctionTest}}
> {code:java}
> // Some comments here
>       @Test
>       public void testCornerCase() throws Exception {
>               AbstractTopNFunction func = createFunction(RankType.ROW_NUMBER, 
> new ConstantRankRange(1, 3), false,
>                               false);
>               OneInputStreamOperatorTestHarness<RowData, RowData> testHarness 
> = createTestHarness(func);
>               testHarness.open();
>               testHarness.processElement(insertRecord("a", 1L, 1));
>               testHarness.processElement(insertRecord("a", 2L, 2));
>               testHarness.processElement(insertRecord("a", 3L, 2));
>               testHarness.processElement(insertRecord("a", 4L, 2));
>               testHarness.processElement(insertRecord("a", 5L, 3));
>               testHarness.processElement(insertRecord("a", 6L, 4));
>               testHarness.processElement(updateBeforeRecord("a", 2L, 2));
>               testHarness.close();
>       }
> {code}



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

Reply via email to