Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3470#discussion_r104298146
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/SumAggFunction.scala
 ---
    @@ -23,10 +23,11 @@ import java.util.{List => JList}
     import org.apache.flink.api.common.typeinfo.{BasicTypeInfo, 
TypeInformation}
     import org.apache.flink.api.java.tuple.{Tuple2 => JTuple2}
     import org.apache.flink.api.java.typeutils.TupleTypeInfo
    +import org.apache.flink.table.api.TableException
     import org.apache.flink.table.functions.{Accumulator, AggregateFunction}
     
     /** The initial accumulator for Sum aggregate function */
    -class SumAccumulator[T] extends JTuple2[T, Boolean] with Accumulator
    +class SumAccumulator[T] extends JTuple2[T, Long] with Accumulator
    --- End diff --
    
    I think we should also offer `SumAccumulator` with and without retraction. 
The difference between `Long` and `Boolean` is 7 bytes, which is a lot of 
additional overhead for most types.


---
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.
---

Reply via email to