Skip to main content

merge (Aggregate Function)

Collects multiple lists to merge as a single list.

Syntax

<OBJECT> list:merge(<OBJECT> list)
<OBJECT> list:merge(<OBJECT> list, <BOOL> is.distinct)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
listList to be mergedOBJECTNoYes
is.distinctWhether to return list with distinct valuesfalseBOOLYesYes

Example 1

insert into OutputStream
select list:merge(list) as stockSymbols
from StockStream WINDOW TUMBLING_LENGTH(2);

For the window expiration of two events, the merge() function collects attributes of list and merges them to a single list, returned as stockSymbols.