blob: 4e0105992cb80e611bb6521a4b00e75f5b9a352a [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse index_search if exists;
2
3create dataverse index_search;
4
5use dataverse index_search;
6
7create type OrderType as closed {
8 o_orderkey: int32,
9 o_custkey: int32,
10 o_orderstatus: string,
11 o_totalprice: double,
12 o_orderdate: string,
13 o_orderpriority: string,
14 o_clerk: string,
15 o_shippriority: int32,
16 o_comment: string
17}
18
19
20create nodegroup group1 if not exists on nc1, nc2;
21
22create dataset Orders(OrderType)
ramangrover29669d8f62013-02-11 06:03:32 +000023 primary key o_orderkey on group1;
vinayakb38b7ca42012-03-05 05:44:15 +000024
25create index idx_Orders_Custkey on Orders(o_custkey);
26
27write output to nc1:"/tmp/index_search.adm";
28
29for $o in dataset('Orders')
30where
31 $o.o_custkey = 40
32return {
33 "o_orderkey": $o.o_orderkey,
34 "o_custkey": $o.o_custkey
35}