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

    https://github.com/apache/flink/pull/3354#discussion_r102693258
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/MaxAggFunction.scala
 ---
    @@ -28,8 +28,9 @@ import org.apache.flink.table.functions.{Accumulator, 
AggregateFunction}
       * @tparam T the type for the aggregation result
       */
     abstract class MaxAggFunction[T](implicit ord: Ordering[T]) extends 
AggregateFunction[T] {
    +
       /** The initial accumulator for Max aggregate function */
    -  class MaxAccumulator[T] extends Accumulator {
    +  class MaxAccumulator[T] extends JTuple2[T, Boolean] with Accumulator {
         var max: T = null.asInstanceOf[T]
    --- End diff --
    
    Instead of adding a field here, you need to provide default values in the 
`createAccumulator` method. Note, `f0`  and `f1` may not be null. Otherwise, 
the tuple cannot be serialized.


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