flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sunjincheng121 <...@git.apache.org>
Subject [GitHub] flink pull request #4379: [FLINK-7194] [table] Add methods for type hints to...
Date Fri, 21 Jul 2017 00:40:56 GMT
Github user sunjincheng121 commented on a diff in the pull request:

    --- 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,
         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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message