flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lilizhao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8903) Error calculation based on rolling window in table API and SQL API
Date Mon, 12 Mar 2018 10:03:00 GMT

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

lilizhao commented on FLINK-8903:
---------------------------------

[~fhueske] 

A new example:

SQL = "SELECT VAR_POP (CCNT), COLLECT (CCNT), name, TUMBLE_START (proctime, INTERVAL'1'MINUTE)"
+

"FROM AggTable GROUP BY TUMBLE (proctime, INTERVAL'1'MINUTE), name";

Return all values with COLLECT (FieldName) and return the variance with VAR_POP (FieldName).

The results returned are as follows:

50.5, \{1.0=1, 100.0=1}, Li, 2018-03-12 09:48:00.0

The input data is 1 and 100, and the calculated variance is 50.5. It is still wrong.

!QQ图片20180312180143.jpg!

> Error calculation based on rolling window in table API and SQL API
> ------------------------------------------------------------------
>
>                 Key: FLINK-8903
>                 URL: https://issues.apache.org/jira/browse/FLINK-8903
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>    Affects Versions: 1.4.1
>            Reporter: lilizhao
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: QQ图片20180312180143.jpg, TableAndSQLTest.java
>
>
> Error calculation based on rolling window in table API and SQL API
> The variance of the calculation is equal to the average.
> 1 The test code is detailed in the appendix 
> 2 The test data are as follows
> 1 li
> 100 li
> 3 The Table API test result as follows
> (true,50.5,101.0,50.5,li,2018-03-09 09:11:00.0)
> 4 The SQL API test result as follows
> (true,50.5,2,101.0,50.5,li,2018-03-09 09:21:00.0)
>  



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

Mime
View raw message