flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #3735: [FLINK-6242] [table] Add code generation for DataS...
Date Tue, 18 Apr 2017 20:21:42 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message