Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3735#discussion_r111991399
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/CodeGenerator.scala
---
@@ -407,32 +513,56 @@ class CodeGenerator(
accTypes: Array[String],
aggs: Array[String]): String = {
- val sig: String =
+ val sigHelper: String =
j"""
- | public org.apache.flink.types.Row mergeAccumulatorsPair(
+ | public final org.apache.flink.types.Row
mergeAccumulatorsPairHelper(
| org.apache.flink.types.Row a,
- | org.apache.flink.types.Row b)
+ | org.apache.flink.types.Row b,
+ | java.lang.Integer offset)
""".stripMargin
- val merge: String = {
+ val mergeHelper: String = {
for (i <- aggs.indices) yield
j"""
| ${accTypes(i)} aAcc$i = (${accTypes(i)}) a.getField($i);
- | ${accTypes(i)} bAcc$i = (${accTypes(i)}) b.getField($i);
+ | ${accTypes(i)} bAcc$i = (${accTypes(i)}) b.getField($i +
offset);
--- End diff --
`b.getField($i + offset)` -> `b.getField(${i + offset})`
---
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.
---