[
https://issues.apache.org/jira/browse/FLINK-4604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15607653#comment-15607653
]
Anton Mushin commented on FLINK-4604:
-------------------------------------
Hello [~fhueske], thanks for your answer!
I added support {{SqlKind.SUM0}} and implement custom {{Sum0Aggregate}}, but
I'm still get
{noformat}
DataSetCalc(select=[CAST(POWER(/(-($f0, /(*($f1, $f1), $f2)), $f2), 0.5)) AS
EXPR$0, CASE(=($f2, 0), null, EXPR$1) AS EXPR$1])
DataSetAggregate(select=[SUM($f6) AS $f0, SUM(_1) AS $f1, COUNT(_1) AS $f2,
$SUM0(_1) AS EXPR$1])
DataSetCalc(select=[_1, _2, _3, _4, _5, _6, *(_1, _1) AS $f6])
DataSetScan(table=[[_DataSetTable_0]])
org.apache.flink.api.table.TableException: Type NULL is not supported. Null
values must have a supported type.
at
org.apache.flink.api.table.FlinkTypeFactory$.toTypeInfo(FlinkTypeFactory.scala:138)
at
org.apache.flink.api.table.codegen.CodeGenerator.visitLiteral(CodeGenerator.scala:553)
{noformat}
and I don't understand where I getting {{CASE(=($f2, 0), null, EXPR$1) AS
EXPR$1])}}
> 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
> Attachments: 1.jpg
>
>
> 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)