blob: cd4a922f28fb432e1ddc500d47fb3ccee58375c4 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse test if exists;
2
3create dataverse test;
4use dataverse test;
5
6create type LineItemType as closed {
7 l_orderkey: int32,
8 l_partkey: int32,
9 l_suppkey: int32,
10 l_linenumber: int32,
11 l_quantity: int32,
12 l_extendedprice: double,
13 l_discount: double,
14 l_tax: double,
15 l_returnflag: string,
16 l_linestatus: string,
17 l_shipdate: string,
18 l_commitdate: string,
19 l_receiptdate: string,
20 l_shipinstruct: string,
21 l_shipmode: string,
22 l_comment: string
23}
24
vinayakb38b7ca42012-03-05 05:44:15 +000025create dataset LineItem(LineItemType)
khfaraaz82@gmail.com502731f2012-05-02 20:38:16 +000026 partitioned by key l_orderkey, l_linenumber;
vinayakb38b7ca42012-03-05 05:44:15 +000027
28load dataset LineItem
29using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
30(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
31
vinayakb38b7ca42012-03-05 05:44:15 +000032delete $l from dataset LineItem where $l.l_orderkey>=10 die after 1500;
33
34write output to nc1:"rttest/failure_delete.adm";
35for $c in dataset('LineItem')
36where $c.l_orderkey>=10
37order by $c.l_orderkey, $c.l_linenumber
38return $c