blob: 5f51b93203a329d898ec73929de3a8d99124c23f [file] [log] [blame]
alexander.behm048a2a32012-05-03 06:18:56 +00001/*
2 * Test case Name : empty-load.aql
3 * Description : Check that an empty load doesn't preclude a future non-empty load on a primary index
4 * Expected Result : Success
5 * Date : May 2 2012
6 */
7
8drop dataverse test if exists;
9create dataverse test;
10use dataverse test;
11
12create type LineIDType as closed {
13 l_orderkey: int32,
14 l_linenumber: int32,
15 l_suppkey: int32
16}
17
18create dataset LineID(LineIDType)
19 partitioned by key l_orderkey, l_linenumber;
20
21load dataset LineID
22using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
23(("path"="nc1://data/empty.adm"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
24
25load dataset LineID
26using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
27(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
28
29write output to nc1:"rttest/dml_empty-load.adm";
30for $c in dataset('LineID')
31order by $c.l_orderkey, $c.l_linenumber
32limit 1
33return $c