[
https://issues.apache.org/jira/browse/FLINK-6242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15972920#comment-15972920
]
ASF GitHub Bot commented on FLINK-6242:
---------------------------------------
Github user shaoxuan-wang commented on a diff in the pull request:
https://github.com/apache/flink/pull/3735#discussion_r111986331
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/GeneratedAggregations.scala
---
@@ -36,6 +36,15 @@ abstract class GeneratedAggregations extends Function {
def setAggregationResults(accumulators: Row, output: Row)
/**
+ * Calculates the results from accumulators, and set the results to the
output (with key offset)
+ *
+ * @param accumulators the accumulators (saved in a row) which contains
the current
+ * aggregated results
+ * @param output output results collected in a row
+ */
+ def setAggregationResultsWithKeyOffset(accumulators: Row, output: Row)
--- End diff --
This sounds a very good idea. I actually have thought to merge
*WithKeyOffset functions into the existing functions. It works for most
functions, but `setAggregationResults` and `setAggregationResults` are a little
tricky. For `accumulate` and `setAggregateResults`, they do not need keyOffset,
but for `merge`, they need.
> codeGen DataSet Goupingwindow Aggregates
> ----------------------------------------
>
> Key: FLINK-6242
> URL: https://issues.apache.org/jira/browse/FLINK-6242
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Shaoxuan Wang
> Assignee: Shaoxuan Wang
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)