buyingyi | a1f70e0 | 2015-02-04 15:13:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Description : This test case is to verify the fix for issue827 |
| 3 | * https://code.google.com/p/asterixdb/issues/detail?id=849 |
| 4 | * Expected Res : SUCCESS |
| 5 | * Date : 2nd Feb. 2015 |
| 6 | */ |
| 7 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | |
| 11 | use dataverse test; |
| 12 | |
| 13 | create type sType as closed{b : int32}; |
| 14 | create dataset s(sType) primary key b; |
| 15 | |
| 16 | insert into dataset s ({ "b" : 1}); |
| 17 | insert into dataset s ({ "b" : 3}); |
| 18 | |
| 19 | for $x in dataset s |
| 20 | for $y in ( |
| 21 | for $z in {{ {"a":1, "c":1},{"a":2, "c":2},{"a":1, "c":null} }} where $x.b=$z.a |
| 22 | return $z.c |
| 23 | ) |
| 24 | return {"x":$x,"y":$y} |