是否可以使用" group by window"从流分析查询生成输出?表达式,当窗口为空时?
例如,在this示例中,查询:
SELECT System.Timestamp as WindowEnd, SwitchNum, COUNT(*) as CallCount
FROM CallStream TIMESTAMP BY CallRecTime
GROUP BY TUMBLINGWINDOW(s, 5), SwitchNum
产生输出:
- 2015-04-15T22:10:40.000Z UK 1
- 2015-04-15T22:10:40.000Z US 1
- 2015-04-15T22:10:45.000Z China 1
- 2015-04-15T22:10:45.000Z德国1
- 2015-04-15T22:10:45.000Z UK 3
- 2015-04-15T22:10:45.000Z US 1
- 2015-04-15T22:10:50.000Z Australia 2
- ...
是否有可能使它产生类似的东西:
- 2015-04-15T22:10:40.000Z China 0
- 2015-04-15T22:10:40.000Z Germany 0
- 2015-04-15T22:10:40.000Z UK 1
- 2015-04-15T22:10:40.000Z US 1
- 2015-04-15T22:10:40.000Z Australia 0
- 2015-04-15T22:10:45.000Z China 1
- 2015-04-15T22:10:45.000Z德国1
- 2015-04-15T22:10:45.000Z UK 3
- 2015-04-15T22:10:45.000Z US 1
- 2015-04-15T22:10:45.000Z Australia 0
- ...
目标是使用跳跃窗口检测最近x秒内是否没有事件。