Github user hongyuhong commented on a diff in the pull request:
https://github.com/apache/flink/pull/3386#discussion_r102652877
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/IncrementalAggregateReduceFunction.scala
---
@@ -52,9 +53,14 @@ class IncrementalAggregateReduceFunction(
// and directly merge value1 and value2.
val accumulatorRow = new Row(intermediateRowArity)
- // copy all fields of value1 into accumulatorRow
- (0 until intermediateRowArity)
- .foreach(i => accumulatorRow.setField(i, value1.getField(i)))
+ // copy non agg fields of value2 into accumulatorRow
+ (0 until aggOffset)
+ .foreach(i => accumulatorRow.setField(i, value2.getField(i)))
+
+ // copy agg fields of value1 into accumulatorRow
--- End diff --
IMO, groupWindow's non-agg fields is group fields, and whether copy from
value1 or value2 is the same, what do you think?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---