Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/5241#discussion_r162639253
--- 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().
--- End diff --
`For instance count(42) or count(*) which will optimized to count().` ->
`For instance count(42) or count(*) will be optimized to count().`
---