[ 
https://issues.apache.org/jira/browse/FLINK-9422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16489081#comment-16489081
 ] 

Fabian Hueske commented on FLINK-9422:
--------------------------------------

[~hequn8128], you are right. The operator would only emit an append stream. 
However, we can have two implementations of the operator. One that works with 
time attributes and watermarks and the other one that is similar to the 
non-windowed aggregation. The advantage of the first one is that is only needs 
to hold the data between two watermarks in state. The other one must 
materialize all distinct values of both input tables.

> Dedicated operator for UNION on streaming tables with time attributes
> ---------------------------------------------------------------------
>
>                 Key: FLINK-9422
>                 URL: https://issues.apache.org/jira/browse/FLINK-9422
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Fabian Hueske
>            Assignee: Ruidong Li
>            Priority: Minor
>
> We can implement a dedicated operator for a {{UNION}} operator on tables with 
> time attributes. Currently, {{UNION}} is translated into a {{UNION ALL}} and 
> a subsequent {{GROUP BY}} on all attributes without aggregation functions. 
> The state of the grouping operator is only clean up using state retention 
> timers. 
> The dedicated operator would leverage the monotonicity property of the time 
> attribute and watermarks to automatically clean up its state.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to