Skip to main content

createSet (Function)

Includes the given input parameter in a java.util.HashSet and returns the set.

Syntax

    <OBJECT> createSet(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL> input)

QUERY PARAMETERS

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
inputThe input that needs to be added into the set.INT LONG DOUBLE FLOAT STRING BOOLNoYes

Example 1

    insert into initStream
select createSet(symbol) as initialSet
from stockStream;

For every incoming stockStream event, the initStream stream produces a set object having only one element: the symbol in the incoming stockStream.