Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/4585#discussion_r142664563
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
---
@@ -1410,6 +1410,26 @@ object AggregateUtil {
case _: SqlCountAggFunction =>
aggregates(index) = new CountAggFunction
+ case collect: SqlAggFunction if collect.getKind == SqlKind.COLLECT
=>
+ aggregates(index) = sqlTypeName match {
--- End diff --
We can pass the actual `TypeInformation` of the argument type here to the
constructor of the `CollectAggFunction` and don't need to distinguish the
different argument types.
---