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:

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

Mime
View raw message