[jira] [Created] (FLINK-20271) ArrayIndexOutOfBounds When using Rank

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-20271) ArrayIndexOutOfBounds When using Rank

Shang Yuanchun (Jira)
Shengkai Fang created FLINK-20271:
-------------------------------------

             Summary: ArrayIndexOutOfBounds When using Rank
                 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


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)