alexander.behm | 048a2a3 | 2012-05-03 06:18:56 +0000 | [diff] [blame^] | 1 | /* |
| 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 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | use dataverse test; |
| 11 | |
| 12 | create type LineIDType as closed { |
| 13 | l_orderkey: int32, |
| 14 | l_linenumber: int32, |
| 15 | l_suppkey: int32 |
| 16 | } |
| 17 | |
| 18 | create dataset LineID(LineIDType) |
| 19 | partitioned by key l_orderkey, l_linenumber; |
| 20 | |
| 21 | load dataset LineID |
| 22 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 23 | (("path"="nc1://data/empty.adm"),("format"="delimited-text"),("delimiter"="|")) pre-sorted; |
| 24 | |
| 25 | load dataset LineID |
| 26 | using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter" |
| 27 | (("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted; |
| 28 | |
| 29 | write output to nc1:"rttest/dml_empty-load.adm"; |
| 30 | for $c in dataset('LineID') |
| 31 | order by $c.l_orderkey, $c.l_linenumber |
| 32 | limit 1 |
| 33 | return $c |