vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 1 | drop dataverse prim_index_search if exists; |
| 2 | |
| 3 | create dataverse prim_index_search; |
| 4 | |
| 5 | use dataverse prim_index_search; |
| 6 | |
| 7 | |
| 8 | create type OrderType as closed { |
| 9 | o_orderkey: int32, |
| 10 | o_custkey: int32, |
| 11 | o_orderstatus: string, |
| 12 | o_totalprice: double, |
| 13 | o_orderdate: string, |
| 14 | o_orderpriority: string, |
| 15 | o_clerk: string, |
| 16 | o_shippriority: int32, |
| 17 | o_comment: string |
| 18 | } |
| 19 | |
| 20 | |
| 21 | create nodegroup group1 if not exists on nc1, nc2; |
| 22 | |
| 23 | create dataset Orders(OrderType) |
ramangrover29 | 669d8f6 | 2013-02-11 06:03:32 +0000 | [diff] [blame] | 24 | primary key o_orderkey on group1; |
vinayakb | 38b7ca4 | 2012-03-05 05:44:15 +0000 | [diff] [blame] | 25 | |
| 26 | |
| 27 | write output to nc1:"/tmp/prim_index_search.adm"; |
| 28 | |
| 29 | |
| 30 | for $o in dataset('Orders') |
| 31 | where |
| 32 | $o.o_orderkey = 34 |
| 33 | return { |
| 34 | "o_orderkey": $o.o_orderkey, |
| 35 | "o_custkey": $o.o_custkey |
| 36 | } |