flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Mushin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4604) Add support for standard deviation/variance
Date Thu, 06 Oct 2016 12:10:20 GMT

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

Anton Mushin commented on FLINK-4604:
-------------------------------------

I'm use {{RelOptUtil.toString(relNode)}} for getting plan
{code:title=org.apache.flink.api.table.BatchTableEnvironment#translate}
 ..........
val dataSetPlan = try {
      optProgram.run(getPlanner, decorPlan, flinkOutputProps)
    }
    catch {
      ..........
    }
    print(s"\n${RelOptUtil.toString(dataSetPlan)}\n${RelOptUtil.toString(relNode)}")
    dataSetPlan match {
      case node: DataSetRel =>
        node.translateToPlan(
          this,
          Some(tpe.asInstanceOf[TypeInformation[Any]])
        ).asInstanceOf[DataSet[A]]
      case _ => ???
    }
  }
{code}
I getting in the output
{noformat}
DataSetAggregate(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])
  DataSetScan(table=[[_DataSetTable_0]])

LogicalAggregate(group=[{}], EXPR$0=[STDDEV_POP($0)], EXPR$1=[STDDEV_SAMP($0)], EXPR$2=[VAR_SAMP($0)],
EXPR$3=[VAR_POP($0)])
  LogicalProject(_1=[$0])
    LogicalTableScan(table=[[_DataSetTable_0]])
{noformat}

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

Mime
View raw message