[
https://issues.apache.org/jira/browse/FLINK-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15173515#comment-15173515
]
ASF GitHub Bot commented on FLINK-3474:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1746#discussion_r54544027
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/plan/rules/dataset/DataSetAggregateRule.scala
---
@@ -44,17 +45,24 @@ class DataSetAggregateRule
val inputType = agg.getInput.getRowType()
// add grouping fields, position keys in the input, and input type
- val aggregateFunction =
AggregateFactory.createAggregateInstance(agg.getAggCallList,
- inputType, grouping)
+ val aggregateResult =
AggregateUtil.createOperatorFunctionsForAggregates(agg,
+ inputType, rel.getRowType, grouping)
+
+ val mapNode = new DataSetMap(rel.getCluster,
+ traitSet,
+ convInput,
+ aggregateResult.intermediateDataType,
+ agg.toString,
+ aggregateResult.mapFunc)
new DataSetGroupReduce(
rel.getCluster,
traitSet,
- convInput,
+ mapNode,
rel.getRowType,
agg.toString,
- grouping,
- aggregateFunction)
+ (0 until grouping.length).toArray,
+ aggregateResult.reduceGroupFunc)
--- End diff --
Can we also update the `DataSetGroupReduce` to accept a function that
generates the `GroupReduceFunction` instead of the `GroupReduceFunction` itself?
> Partial aggregate interface design and sort-based implementation
> ----------------------------------------------------------------
>
> Key: FLINK-3474
> URL: https://issues.apache.org/jira/browse/FLINK-3474
> Project: Flink
> Issue Type: Sub-task
> Components: Table API
> Reporter: Chengxiang Li
> Assignee: Chengxiang Li
>
> The scope of this sub task includes:
> # Partial aggregate interface.
> # Simple aggregate function implementation, such as SUM/AVG/COUNT/MIN/MAX.
> # DataSetAggregateRule which translate logical calcite aggregate node to
> Flink user functions. As hash-based combiner is not available yet(see PR
> #1517), we would use sort-based combine as default.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)