[
https://issues.apache.org/jira/browse/FLINK-12345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
godfrey he updated FLINK-12345:
-------------------------------
Description:
This issue aims to add support for generating optimized logical plan for
stream window aggregate queries, e.g.
{code:sql}
SELECT COUNT(*),
TUMBLE_END(rowtime, INTERVAL '15' MINUTE) + INTERVAL '1' MINUTE
FROM MyTable
GROUP BY TUMBLE(rowtime, INTERVAL '15' MINUTE)
{code}
the above query will be optimized to following plan
{code:sql}
Calc(select=[EXPR$0, +(CAST(w$end), 60000:INTERVAL MINUTE) AS EXPR$1])
+- GroupWindowAggregate(window=[TumblingGroupWindow], properties=[w$start,
w$end, w$rowtime], select=[COUNT(*) AS EXPR$0, start('w$) AS w$start, end('w$)
AS w$end, rowtime('w$) AS w$rowtime])
+- Exchange(distribution=[single])
+- Calc(select=[rowtime])
+- DataStreamScan(table=[[_DataStreamTable_0]], fields=[a, b, c,
proctime, rowtime])
{code}
was:
Add support for generating optimized logical plan for stream window aggregate
queries, e.g.
> Add support for generating optimized logical plan for stream window aggregate
> -----------------------------------------------------------------------------
>
> Key: FLINK-12345
> URL: https://issues.apache.org/jira/browse/FLINK-12345
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / Planner
> Reporter: godfrey he
> Assignee: godfrey he
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> This issue aims to add support for generating optimized logical plan for
> stream window aggregate queries, e.g.
> {code:sql}
> SELECT COUNT(*),
> TUMBLE_END(rowtime, INTERVAL '15' MINUTE) + INTERVAL '1' MINUTE
> FROM MyTable
> GROUP BY TUMBLE(rowtime, INTERVAL '15' MINUTE)
> {code}
> the above query will be optimized to following plan
> {code:sql}
> Calc(select=[EXPR$0, +(CAST(w$end), 60000:INTERVAL MINUTE) AS EXPR$1])
> +- GroupWindowAggregate(window=[TumblingGroupWindow], properties=[w$start,
> w$end, w$rowtime], select=[COUNT(*) AS EXPR$0, start('w$) AS w$start,
> end('w$) AS w$end, rowtime('w$) AS w$rowtime])
> +- Exchange(distribution=[single])
> +- Calc(select=[rowtime])
> +- DataStreamScan(table=[[_DataStreamTable_0]], fields=[a, b, c,
> proctime, rowtime])
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)