Remove stream events for Aggregated Queries
Output sample for the Esper 1.x engine:
select symbol, sum(price) from MarketData.win:time(5.5 sec)
Input Output
Insert Stream Remove Stream
----------------------------------------------- ----------------------------------
Time Symbol Volume Price
0.2
IBM 100 25.0 Event E1 arrives
[IBM, 25.0]
0.8
MSFT 5000 9.0 Event E2 arrives
[MSFT, 34.0]
1.0
1.2
1.5
IBM 150 24.0 Event E3 arrives
[IBM, 58.0]
YAH 10000 1.0 Event E4 arrives
[YAH, 59.0]
2.0
2.1
IBM 155 26.0 Event E5 arrives
[IBM, 85.0]
2.2
2.5
3.0
3.2
3.5
YAH 11000 2.0 Event E6 arrives
[YAH, 87.0]
4.0
4.2
4.3
IBM 150 22.0 Event E7 arrives
[IBM, 109.0]
4.9
YAH 11500 3.0 Event E8 arrives
[YAH, 112.0]
5.0
5.2
5.7 Event E1 leaves the time window
[IBM, 112.0]
5.9
YAH 10500 1.0 Event E9 arrives
[YAH, 88.0]
6.0
6.2
6.3 Event E2 leaves the time window
[MSFT, 88.0]
7.0 Event E3 and E4 leave the time window
[IBM, 79.0]
[YAH, 79.0]
7.2
Output Rate Limiting and Fully-aggregated Queries
Output sample for the Esper 1.x engine:
select symbol, sum(price) from MarketData.win:time(5.5 sec) group by symbol output every 1 seconds Input Output Insert Stream Remove Stream ----------------------------------------------- ---------------------------------- Time Symbol Volume Price 0.2 IBM 100 25.0 Event E1 arrives 0.8 MSFT 5000 9.0 Event E2 arrives 1.0 1.2 [IBM, 25.0] [IBM, null] [MSFT, 9.0] [MSFT, null] 1.5 IBM 150 24.0 Event E3 arrives YAH 10000 1.0 Event E4 arrives 2.0 2.1 IBM 155 26.0 Event E5 arrives 2.2 [IBM, 75.0] [IBM, 25.0] [MSFT, 9.0] [MSFT, null] [YAH, 1.0] [YAH, null] 2.5 3.0 3.2 [IBM, 75.0] [IBM, 25.0] [MSFT, 9.0] [MSFT, null] [YAH, 1.0] [YAH, null] 3.5 YAH 11000 2.0 Event E6 arrives 4.0 4.2 [IBM, 75.0] [IBM, 25.0] [MSFT, 9.0] [MSFT, null] [YAH, 3.0] [YAH, 1.0] 4.3 IBM 150 22.0 Event E7 arrives 4.9 YAH 11500 3.0 Event E8 arrives 5.0 5.2 [IBM, 97.0] [IBM, 75.0] [MSFT, 9.0] [MSFT, null] [YAH, 6.0] [YAH, 3.0] 5.7 Event E1 leaves the time window 5.9 YAH 10500 1.0 Event E9 arrives 6.0 6.2 [IBM, 72.0] [IBM, 97.0] [MSFT, 9.0] [MSFT, null] [YAH, 7.0] [YAH, 6.0] 6.3 Event E2 leaves the time window 7.0 Event E3 and E4 leave the time window 7.2 [IBM, 48.0] [IBM, 72.0] [MSFT, null] [MSFT, 9.0] [YAH, 6.0] [YAH, 7.0]
Output Sample for an Aggregated and Un-grouped query with output-rate limiting
Output sample for the Esper 1.x engine:
Statement:
select symbol, sum(price) from MarketData.win:time(5.5 sec) output every 1 seconds
Input Output
Insert Stream Remove Stream
----------------------------------------------- ----------------------------------
Time Symbol Volume Price
0.2
IBM 100 25.0 Event E1 arrives
0.8
MSFT 5000 9.0 Event E2 arrives
1.0
1.2
[IBM, 34.0]
[MSFT, 34.0]
1.5
IBM 150 24.0 Event E3 arrives
YAH 10000 1.0 Event E4 arrives
2.0
2.1
IBM 155 26.0 Event E5 arrives
2.2
[IBM, 85.0]
[YAH, 85.0]
[IBM, 85.0]
2.5
3.0
3.2
(empty result) (empty result)
3.5
YAH 11000 2.0 Event E6 arrives
4.0
4.2
[YAH, 87.0]
4.3
IBM 150 22.0 Event E7 arrives
4.9
YAH 11500 3.0 Event E8 arrives
5.0
5.2
[IBM, 112.0]
[YAH, 112.0]
5.7 Event E1 leaves the time window
5.9
YAH 10500 1.0 Event E9 arrives
6.0
6.2
[YAH, 88.0] [IBM, 112.0]
6.3 Event E2 leaves the time window
7.0 Event E3 and E4 leave the time window
7.2
[MSFT, 88.0]
[IBM, 88.0]
[YAH, 88.0]
Labels
(None)