A description of how CCL windows maintain row states in Sybase CEP Engine.
A CCL query can only process a row in a data stream once it arrives in the Sybase CEP Engine. A query that subscribes to a data stream has access only to the most recent arrival in the stream. However, CCL queries frequently require that the state of previously-received rows be maintained, in order to perform analysis or computations on multiple rows. For example, a query that calculates the moving average of the number of shares of stock traded over the previous hour, requires that the data for all trades (or at least the volume data) for the past hour be retained in some way to calculate the average. In such cases, CCL windows are used to maintain the state of previously arrived rows. CCL queries subscribing to these windows may then access all the rows in the window.
Since data streams and windows can both act as data sources and destinations for queries, the terms data source and destination are often used in Sybase CEP documentation to refer to either a stream or a window. Thus, the basic relationship between queries and data streams can be expanded to include data streams or windows.