uCosminexus Stream Data Platform - Application Framework Application Development Guide
window-specification::={ROWS
integer-constant
|RANGE
integer-constant[
time-specification]
|NOW
|PARTITION
BY
column-specification-list
ROWS
integer-constant}
Specifies how long data is retained in a stream. Window specification is entered in a relation reference.
Specify a value in the range from 1 to 100,000 for the number of rows that are retained in the stream.
Specifies how long data stays in the stream. If you specify time division for a query, you must specify RANGE.
Specifies an amount of time. For the range of integer constant values, see 4.4.16 Time specification.
Specifies a unit for the time specified in integer-constant. For details about time specification, see 4.4.16 Time specification.
If you do not specify this, the value specified in integer-constant is assumed to be in seconds.
Only items currently in the stream will be processed.
Applies ROWS processing to each column name value specified in the column specification list.
For details about specifying a column specification list, see 4.4.13 Column specification list.
For the column specification list, you can specify a column name.
None.
Specifies that rows remain in the stream in relation s1 for 2 seconds. The underlined part indicates the window specification.
REGISTER QUERY q1 SELECT * FROM s1[RANGE 2 SECOND];
Specifies that two rows are to remain in the stream for each value of column a in relation s1. The underlined part indicates the window specification.
REGISTER QUERY q1 SELECT * FROM s1[PARTITION BY s1.a ROWS 2];
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.