[
https://issues.apache.org/jira/browse/FLINK-21305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jark Wu closed FLINK-21305.
---------------------------
Resolution: Fixed
Fixed in master: 3dd50dd01e49c79d33165a737974cb8e913cb195
> Fix Cumulative and Hopping window should accumulate late events belonging to
> the cleaned slice
> ----------------------------------------------------------------------------------------------
>
> Key: FLINK-21305
> URL: https://issues.apache.org/jira/browse/FLINK-21305
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Reporter: Jark Wu
> Assignee: Jark Wu
> Priority: Critical
> Labels: pull-request-available
> Fix For: 1.13.0
>
>
> Currently, the CUMULATE window drops elements belonging to the cleaned
> slices. This will lead to more inaccurate result than without slicing
> optimization.
> Hopping window has the similar problem, you can reproduce the problem with
> the following test in {{WindowAggregateJsonITCase}}.
> {code:scala}
> @Test
> public void testEventTimeHopWindow2() throws Exception {
> createTestValuesSinkTable("MySink", "name STRING", "cnt BIGINT");
> String jsonPlan =
> tableEnv.getJsonPlan(
> "insert into MySink select\n"
> + " name,\n"
> + " COUNT(*)\n"
> + "FROM TABLE(\n"
> + " HOP(TABLE MyTable, DESCRIPTOR(rowtime),
> INTERVAL '5' SECOND, INTERVAL '10' SECOND))\n"
> + "GROUP BY name, window_start, window_end");
> tableEnv.executeJsonPlan(jsonPlan).await();
> List<String> result = TestValuesTableFactory.getResults("MySink");
> assertResult(
> Arrays.asList(
> "+I[a, 1]",
> "+I[a, 4]",
> "+I[a, 6]",
> "+I[b, 1]",
> "+I[b, 1]",
> "+I[b, 1]",
> "+I[b, 1]",
> "+I[b, 2]",
> "+I[b, 2]",
> "+I[null, 1]",
> "+I[null, 1]"),
> result);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)