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

Anton Mushin edited comment on FLINK-4604 at 10/6/16 2:24 PM:
--------------------------------------------------------------

bq. Can you check if AggregateReduceFunctionsRule.matches is called?
yes it was called. It was called from 
{{org.apache.calcite.plan.volcano.VolcanoRuleCall#matchRecurse}} when executing 
{{org.apache.calcite.plan.volcano.VolcanoPlanner#findBestExp}} on OPTIMIZE 
phase. ([see screenshot for check|^1.jpg])
But how best rule selected DatasetSetAggregate object: 
Aggregate(}select:(STDDEV_POP(_1) AS EXPR$0, STDDEV_SAMP(_1) AS EXPR$1, 
VAR_SAMP(_1) AS EXPR$2, VAR_POP(_1) AS EXPR$3)) and this plan return as 
dataSetPlan into {{org.apache.flink.api.table.BatchTableEnvironment#translate}}


was (Author: anmu):
bq. Can you check if AggregateReduceFunctionsRule.matches is called?
yes it is called. It was called from 
{{org.apache.calcite.plan.volcano.VolcanoRuleCall#matchRecurse}} when executing 
{{org.apache.calcite.plan.volcano.VolcanoPlanner#findBestExp}} on OPTIMIZE 
phase. ([see screenshot for check|^1.jpg])
But how best rule selected DatasetSetAggregate object: 
Aggregate(}select:(STDDEV_POP(_1) AS EXPR$0, STDDEV_SAMP(_1) AS EXPR$1, 
VAR_SAMP(_1) AS EXPR$2, VAR_POP(_1) AS EXPR$3)) and this plan return as 
dataSetPlan into {{org.apache.flink.api.table.BatchTableEnvironment#translate}}

> 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)

Reply via email to