blob: 7a22597d235e8efadf314aadc9ae7d82a8c17028 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse prim_index_search if exists;
2
3create dataverse prim_index_search;
4
5use dataverse prim_index_search;
6
7
8create 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
21create nodegroup group1 if not exists on nc1, nc2;
22
23create dataset Orders(OrderType)
24 partitioned by key o_orderkey on group1;
25
26
27write output to nc1:"/tmp/prim_index_search.adm";
28
29
30for $o in dataset('Orders')
31where
32 $o.o_orderkey = 34
33return {
34 "o_orderkey": $o.o_orderkey,
35 "o_custkey": $o.o_custkey
36}