Skip to main content

maxForever (Aggregate Function)

This is the attribute aggregator to store the maximum value for a given attribute throughout the lifetime of the query regardless of any windows in-front.

Syntax

    <INT|LONG|DOUBLE|FLOAT> maxForever(<INT|LONG|DOUBLE|FLOAT> arg)

QUERY PARAMETERS

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
argThe value that needs to be compared to find the maximum value.INT LONG DOUBLE FLOATNoYes

Example 1

    insert into outputStream
select maxForever(temp) as max
from inputStream;

maxForever(temp) returns the maximum temp value recorded for all the events throughout the lifetime of the query.