blob: ee418e46fe3f134f45f17b6bb2f81dca6f3c251d [file] [log] [blame]
alexander.behm048a2a32012-05-03 06:18:56 +00001/*
2 * Test case Name : empty-load-with-index.aql
3 * Description : Check that an empty load doesn't preclude a future non-empty load on secondary 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
21create index linenum_index on LineID(l_linenumber);
22
23load dataset LineID
24using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
25(("path"="nc1://data/empty.adm"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
26
27load dataset LineID
28using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
29(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
30
31write output to nc1:"rttest/dml_empty-load-with-index.adm";
32for $c in dataset('LineID')
33order by $c.l_orderkey, $c.l_linenumber
34limit 1
35return $c