Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/5241#discussion_r160271966 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala --- @@ -1130,259 +1134,263 @@ object AggregateUtil { // create aggregate function instances by function type and aggregate field data type. aggregateCalls.zipWithIndex.foreach { case (aggregateCall, index) => val argList: util.List[Integer] = aggregateCall.getArgList - if (argList.isEmpty) { - if (aggregateCall.getAggregation.isInstanceOf[SqlCountAggFunction]) { - aggFieldIndexes(index) = Array[Int](0) --- End diff -- Couldn't just change this line to `aggFieldIndexes(index) = Array[Int](-1)` instead of touching each line of this method?
---