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

    https://github.com/apache/flink/pull/3354#discussion_r102692834
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.scala
 ---
    @@ -28,8 +28,9 @@ import org.apache.flink.table.functions.{Accumulator, 
AggregateFunction}
       * @tparam T the type for the aggregation result
       */
     abstract class IntegralAvgAggFunction[T] extends AggregateFunction[T] {
    +
       /** The initial accumulator for Integral Avg aggregate function */
    -  class IntegralAvgAccumulator extends Accumulator {
    +  class IntegralAvgAccumulator extends JTuple2[Long, Long] with 
Accumulator {
    --- End diff --
    
    If you are using a `JTuple` you may not add additional fields but should 
use the Tuple2 fields (`f0` and `f1`). 
    Since the `TupleSerializer` is not aware of the added fields, 
`IntegralAvgAccumulator` won't be treated as Tuple2 by Flink.


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