Using ELEMENT_TIME With GROUP BY

3-4 Oracle Complex Event Processing CQL Language Reference from the window, the queryCount for that queryText group would change resulting in an output. However, since there was no new event from the input stream queryEventChannel entering the window, the maxTime among all events in the window has not changed, and the value of the maxTime attribute for this output event would be the same as the value of this attribute in the previous output event. However, the ELEMENT_TIME of the output event corresponds to the instant where the event has expired from the window, which is different than the latest event from the input stream, making this is an example where ELEMENT_TIME of the output event is different from value of maxTime attribute of the output event. To select the ELEMENT_TIME of the output events of view V1, create a query as Example 3–6 shows. Example 3–6 Query query id=Q1[CDATA[ SELECT queryText, queryCount, ELEMENT_TIME as eventTime FROM V1 ]]query

3.2.2.3 Using ELEMENT_TIME With PATTERN

Example 3–7 shows how the ELEMENT_TIME pseudocolumn can be used in a pattern query. Here a tuple or event matches correlation variable Nth if the value of Nth.status is = F.status and if the difference between the Nth.ELEMENT_TIME value of that tuple and the tuple that last matched F is less than the given interval as a java.lang.Math.BigintLong. Example 3–7 ELEMENT_TIME Pseudocolumn in a Pattern ... PATTERN F Nth+? L DEFINE Nth AS Nth.status = F.status AND Nth.ELEMENT_TIME - F.ELEMENT_TIME 10000000000L, L AS L.status = F.status AND countNth. = 3 AND L.ELEMENT_TIME - F.ELEMENT_TIME 10000000000L ... 4 Operators 4-1 4 Operators An operator manipulates data items and returns a result. Syntactically, an operator appears before or after an operand or between two operands.

4.1 Introduction to Operators

Operators manipulate individual data items called operands or arguments. Operators are represented by special characters or by keywords. For example, the multiplication operator is represented by an asterisk . Oracle CQL provides the following operators: ■ Arithmetic Operators on page 4-3 ■ Concatenation Operator on page 4-4 ■ Alternation Operator on page 4-5 ■ Range-Based Stream-to-Relation Window Operators on page 4-6 ■ Tuple-Based Stream-to-Relation Window Operators on page 4-13 ■ Partitioned Stream-to-Relation Window Operators on page 4-18 ■ IStream Relation-to-Stream Operator on page 4-24 ■ DStream Relation-to-Stream Operator on page 4-25 ■ RStream Relation-to-Stream Operator on page 4-26

4.1.1 What You May Need to Know About Unary and Binary Operators

The two general classes of operators are: ■ unary : A unary operator operates on only one operand. A unary operator typically appears with its operand in this format: operator operand ■ binary : A binary operator operates on two operands. A binary operator appears with its operands in this format: operand1 operator operand2 Other operators with special formats accept more than two operands. If an operator is given a null operand, then the result is always null. The only operator that does not follow this rule is concatenation ||.