diff --git a/modules/siddhi-core/src/main/java/io/siddhi/core/query/selector/attribute/aggregator/CountAttributeAggregatorExecutor.java b/modules/siddhi-core/src/main/java/io/siddhi/core/query/selector/attribute/aggregator/CountAttributeAggregatorExecutor.java index f26d888b3a..3b209dcd36 100644 --- a/modules/siddhi-core/src/main/java/io/siddhi/core/query/selector/attribute/aggregator/CountAttributeAggregatorExecutor.java +++ b/modules/siddhi-core/src/main/java/io/siddhi/core/query/selector/attribute/aggregator/CountAttributeAggregatorExecutor.java @@ -19,6 +19,7 @@ import io.siddhi.annotation.Example; import io.siddhi.annotation.Extension; +import io.siddhi.annotation.Parameter; import io.siddhi.annotation.ParameterOverload; import io.siddhi.annotation.ReturnAttribute; import io.siddhi.annotation.util.DataType; @@ -40,9 +41,18 @@ name = "count", namespace = "", description = "Returns the count of all the events.", - parameters = {}, + parameters = { + @Parameter(name = "arg", + description = "This function accepts one parameter. " + + "It can belong to any one of the available types.", + type = {DataType.INT, DataType.LONG, DataType.DOUBLE, DataType.FLOAT, + DataType.STRING, DataType.BOOL, DataType.OBJECT}, + dynamic = true, + optional = true) + }, parameterOverloads = { - @ParameterOverload() + @ParameterOverload(), + @ParameterOverload(parameterNames = {"arg"}) }, returnAttributes = @ReturnAttribute( description = "Returns the event count as a long.",