bounded | unbounded | Specify bounded when you are defining a custom aggregate function that will work with only a bounded window. That is, the query cannot specify retain all. Specify unbounded when you are defining a custom aggregate function that will work with only an unbounded window. That is, the query must specify retain all. Do not specify either bounded or unbounded when you are defining a custom aggregate function that will work with either a bounded or an unbounded window. If you do not specify bounded, you must define the custom aggregate function so that it can handle a window that never removes items. The function should not consume memory per item in the window. |
aggregateName | Specify a name for your aggregate function. This is the name you will specify when you call the function in a select clause. For details about the characters you can specify, see Identifiers in the Apama EPL Reference. |
arglist | Optionally, specify one or more comma-separated type/name pairs. Each pair indicates the type and the name of an argument that you are passing to the function. For example, (float price, integer quantity). |
retType | Specify any EPL type. This is the type of the value that your function returns. |
aggregateBody | The body of a custom aggregate function is similar to an event body. It can contain fields that are specific to one instance of the custom aggregate function and actions to operate on the state. The init(), add(), remove() and value() actions are special. They define how stream queries interact with custom aggregate functions. |