Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/5241#discussion_r160251401 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/CountAggFunction.scala --- @@ -33,7 +33,20 @@ class CountAccumulator extends JTuple1[Long] { /** * built-in count aggregate function */ -class CountAggFunction extends AggregateFunction[JLong, CountAccumulator] { +class CountAggFunction + extends AggregateFunction[JLong, CountAccumulator] { + + // process argument is optimized by calcite. + // For instance count(42) or count(*) which will optimized to count(). + def accumulate(acc: CountAccumulator): Unit = { + acc.f0 += 1L + } + + // process argument is optimized by calcite. --- End diff -- `calcite` -> `Calcite`
---