Github user sunjincheng121 commented on a diff in the pull request:
https://github.com/apache/flink/pull/4379#discussion_r128660377
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.scala
---
@@ -80,11 +80,11 @@ abstract class IntegralAvgAggFunction[T] extends
AggregateFunction[T, IntegralAv
acc.f1 = 0L
}
- def getAccumulatorType: TypeInformation[_] = {
+ override def getAccumulatorType: TypeInformation[IntegralAvgAccumulator]
= {
new TupleTypeInfo(
new IntegralAvgAccumulator().getClass,
--- End diff --
How about classOf[IntegralAvgAccumulator], Although classOf[T] is
equivalent to the class literal T.class in Java. but I think it is more
concise.What do you think?
---
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.
---