blob: 7a01a3b6356c202ab82a7df006a3d4a1434890e0 [file] [log] [blame]
buyingyibd904112014-10-27 18:41:43 -07001/*
2 * Description : This test case is to verify the fix for issue550
3 * https://code.google.com/p/asterixdb/issues/detail?id=550
4 * Expected Result : Success
5 * Date : 25th October 2014
6 */
7
8let $sample :=
9{{
10 {"r": 1, "uid": "1a2b", "t": datetime("2000-01-01T01:00:00"), "event": "e1"},
11 {"r": 2, "uid": "1a2b", "t": datetime("2000-01-01T01:01:00"), "event": "e2"},
12 {"r": 3, "uid": "3c4d", "t": datetime("2000-01-01T01:02:00"), "event": "e1"},
13 {"r": 4, "uid": "3c4d", "t": datetime("2000-01-01T01:03:00"), "event": "e3"},
14 {"r": 5, "uid": "1a2b", "t": datetime("2000-01-01T01:04:00"), "event": "e1"},
15 {"r": 6, "uid": "1a2b", "t": datetime("2000-01-01T01:05:00"), "event": "e4"}
16}}
17for $s in $sample
18group by $u := $s.uid with $s
19return {
20 "u": $u,
21 "recs": ( for $srec in $s return $srec )
22 };