flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] walterddr commented on a change in pull request #7201: [FLINK-7208] [table] Optimize Min/MaxWithRetractAggFunction with DataView
Date Thu, 06 Dec 2018 03:50:34 GMT
walterddr commented on a change in pull request #7201: [FLINK-7208] [table] Optimize Min/MaxWithRetractAggFunction
with DataView
URL: https://github.com/apache/flink/pull/7201#discussion_r239320583
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
 ##########
 @@ -1437,36 +1437,30 @@ object AggregateUtil {
 
           case collect: SqlAggFunction if collect.getKind == SqlKind.COLLECT =>
             aggregates(index) = new CollectAggFunction(FlinkTypeFactory.toTypeInfo(relDataType))
-            accTypes(index) = aggregates(index).getAccumulatorType
 
           case udagg: AggSqlFunction =>
             aggregates(index) = udagg.getFunction
-            accTypes(index) = udagg.accType
 
           case unSupported: SqlAggFunction =>
             throw new TableException(s"Unsupported Function: '${unSupported.getName}'")
         }
       }
+      accTypes(index) = getAccumulatorTypeOfAggregateFunction(aggregates(index))
     }
 
     val accSpecs = new Array[Seq[DataViewSpec[_]]](aggregateCalls.size)
 
     // create accumulator type information for every aggregate function
     aggregates.zipWithIndex.foreach { case (agg, index) =>
 
 Review comment:
   +1 you are right. I missed the 4 lines above. 👍 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message