salsubaiee | 201be38 | 2013-07-16 17:50:33 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Test case Name : insert-and-scan-joined-datasets.aql |
| 3 | * Description : This test is intended to test inserting into a dataset where the incoming stream |
| 4 | is involve a join operation that has the same dataset. We insert a materializing to prevent the |
| 5 | possibility of deadlatch. |
| 6 | * Expected Result : Success |
| 7 | * Date : July 11 2013 |
| 8 | */ |
| 9 | |
| 10 | drop dataverse test if exists; |
| 11 | create dataverse test; |
| 12 | |
| 13 | use dataverse test; |
| 14 | |
| 15 | create type myDataType as open { |
| 16 | id: int32 |
| 17 | } |
| 18 | |
| 19 | create dataset myData(myDataType) |
| 20 | primary key id; |
| 21 | |
| 22 | create dataset myData2(myDataType) |
| 23 | primary key id; |
| 24 | |
| 25 | insert into dataset myData ( |
| 26 | for $x in dataset myData2 |
| 27 | for $y in dataset myData |
| 28 | where $x.id = $y.id |
| 29 | return { |
| 30 | "id": $x.id + 1 |
| 31 | } |
| 32 | ); |