blob: 1442482ec5f4b91049e5f3af97b28abcfec6205f [file] [log] [blame]
buyingyib1dd8342014-11-26 14:37:12 -08001/*
2 * Description : This test case is to verify the fix for issue697
3 * https://code.google.com/p/asterixdb/issues/detail?id=697
4 * Expected Result : Success
5 * Date : 16th Nov. 2014
6 */
7
8drop dataverse test if exists;
9create dataverse test;
10
11use dataverse test;
12
13create type TestType as closed {
14 key1: int32,
15 value: int32
16}
17
18create dataset test(TestType)
19 primary key key1;
20
21
22for $i in dataset("test")
23group by $aid := $i.key1 with $i
24return {
25 "gid": $aid,
26 "avg": avg(for $j in $i where not(is-null($j.value)) return $j.value)
27}