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

Timo Walther commented on FLINK-4604:
-------------------------------------

Hi [~anmu],
1. Yes, the test should look like the one in your example. Since this issue 
does not implement new runtime functions, it ok to just test some cases to 
check proper logical translation. We will soon provide a test base so that we 
can just test the logical translation and don't have to run an entire Flink 
program. IMHO one large test for all function is also ok. You also don't need 
to test every data type.

2. Yes this rule has to be added to the DataSet rules. But we don't need new 
runtime functions. Calcite translates all aggregates to SUM/COUNT expressions 
which are already supported in 
{{org.apache.flink.api.table.runtime.aggregate}}. In order to have those 
functions also in the Table API you need to add them to 
{{expressionDsl.scala}}, {{ExpressionParser}}/{{FunctionCatalog}} and create 
expression case classes in {{aggregations.scala}}.

> Add support for standard deviation/variance
> -------------------------------------------
>
>                 Key: FLINK-4604
>                 URL: https://issues.apache.org/jira/browse/FLINK-4604
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Anton Mushin
>
> Calcite's {{AggregateReduceFunctionsRule}} can convert SQL {{AVG, STDDEV_POP, 
> STDDEV_SAMP, VAR_POP, VAR_SAMP}} to sum/count functions. We should add, test 
> and document this rule. 
> If we also want to add this aggregates to Table API is up for discussion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to