blob: fb9682dba34f9ab025619c315bbb77d89046b63b [file] [log] [blame]
pouria.pirzadeh@gmail.comfa890742013-03-07 23:59:21 +00001/*
2 * Description : Test variant syntax for delete
3 * : Ending semi-colon is optional for delete
4 * Expected Res : Success
5 * Date : 6th March 2013
6 */
7
8drop dataverse test if exists;
9create dataverse test;
10use dataverse test;
11
12create type LineItemType as closed {
13 l_orderkey: int32,
14 l_partkey: int32,
15 l_suppkey: int32,
16 l_linenumber: int32,
17 l_quantity: int32,
18 l_extendedprice: double,
19 l_discount: double,
20 l_tax: double,
21 l_returnflag: string,
22 l_linestatus: string,
23 l_shipdate: string,
24 l_commitdate: string,
25 l_receiptdate: string,
26 l_shipinstruct: string,
27 l_shipmode: string,
28 l_comment: string
29}
30
31create dataset LineItem(LineItemType)
32 primary key l_orderkey, l_linenumber;
33
34load dataset LineItem
35using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
36(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
37
38delete $l from dataset LineItem where $l.l_orderkey>=10
39
40write output to nc1:"rttest/dml_delete-syntax-change.adm";
41for $c in dataset('LineItem')
42order by $c.l_orderkey, $c.l_linenumber
43return $c