You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Hequn Cheng (JIRA)" <ji...@apache.org> on 2019/01/03 03:53:00 UTC

[jira] [Comment Edited] (FLINK-11230) Sum of FlinkSql after two table union all.The value is too large.

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

Hequn Cheng edited comment on FLINK-11230 at 1/3/19 3:52 AM:
-------------------------------------------------------------

[~jiweiautohome] Have you change the code of Flink. It should be an EventTimeTrigger instead of a ContinuousEventTimeTrigger.

Since you changed EventTimeTrigger to ContinuousEventTimeTrigger, you changed the behavior of window which against the window semantics. The result has been changed by you, i.e, the result contains more data than it should be.


was (Author: hequn8128):
[~jiweiautohome] Have you change the code of Flink. It should be an EventTimeTrigger instead of a ContinuousEventTimeTrigger.

It is not a bug. Since you changed EventTimeTrigger to ContinuousEventTimeTrigger, you changed the behavior of window which against the window semantics. The result has been changed by you, i.e, the result contains more data than it should be.

> Sum of FlinkSql after two table union all.The value is too large.
> -----------------------------------------------------------------
>
>                 Key: FLINK-11230
>                 URL: https://issues.apache.org/jira/browse/FLINK-11230
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>    Affects Versions: 1.7.0
>            Reporter: jiwei
>            Priority: Blocker
>              Labels: test
>         Attachments: image-2019-01-02-14-18-33-890.png, image-2019-01-02-14-18-43-710.png, screenshot-1.png
>
>
> SELECT k AS KEY, SUM(p) AS pv
>  FROM (
>  SELECT tumble_start(stime, INTERVAL '1' minute) AS k
>  , COUNT(*) AS p
>  FROM flink_test1
>  GROUP BY tumble(stime, INTERVAL '1' minute)
>  UNION ALL
>  SELECT tumble_start(stime, INTERVAL '1' minute) AS k
>  , COUNT(*) AS p
>  FROM flink_test2
>  GROUP BY tumble(stime, INTERVAL '1' minute)
>  ) t
>  GROUP BY k
> The Result of executing this sql is about 7000 per minute and keeping increasing.But the result is 60 per minute for per table.Is there an error in my SQL statement?



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