Fixed a small flaw in recently added tests.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@194 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/empty-load-with-index.aql b/asterix-app/src/test/resources/runtimets/queries/dml/empty-load-with-index.aql
index ee418e4..4f22e84 100644
--- a/asterix-app/src/test/resources/runtimets/queries/dml/empty-load-with-index.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/empty-load-with-index.aql
@@ -9,27 +9,40 @@
create dataverse test;
use dataverse test;
-create type LineIDType as closed {
+create type LineItemType as closed {
l_orderkey: int32,
+ l_partkey: int32,
+ l_suppkey: int32,
l_linenumber: int32,
- l_suppkey: int32
+ l_quantity: double,
+ l_extendedprice: double,
+ l_discount: double,
+ l_tax: double,
+ l_returnflag: string,
+ l_linestatus: string,
+ l_shipdate: string,
+ l_commitdate: string,
+ l_receiptdate: string,
+ l_shipinstruct: string,
+ l_shipmode: string,
+ l_comment: string
}
-create dataset LineID(LineIDType)
+create dataset LineItem(LineItemType)
partitioned by key l_orderkey, l_linenumber;
-create index linenum_index on LineID(l_linenumber);
+create index part_index on LineItem(l_partkey);
-load dataset LineID
+load dataset LineItem
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/empty.adm"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
-load dataset LineID
+load dataset LineItem
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
write output to nc1:"rttest/dml_empty-load-with-index.adm";
-for $c in dataset('LineID')
+for $c in dataset('LineItem')
order by $c.l_orderkey, $c.l_linenumber
limit 1
return $c
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/empty-load.aql b/asterix-app/src/test/resources/runtimets/queries/dml/empty-load.aql
index 5f51b93..f9db086 100644
--- a/asterix-app/src/test/resources/runtimets/queries/dml/empty-load.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/empty-load.aql
@@ -1,6 +1,6 @@
/*
- * Test case Name : empty-load.aql
- * Description : Check that an empty load doesn't preclude a future non-empty load on a primary index
+ * Test case Name : empty-load-with-index.aql
+ * Description : Check that an empty load doesn't preclude a future non-empty load on primary index
* Expected Result : Success
* Date : May 2 2012
*/
@@ -9,25 +9,40 @@
create dataverse test;
use dataverse test;
-create type LineIDType as closed {
+create type LineItemType as closed {
l_orderkey: int32,
+ l_partkey: int32,
+ l_suppkey: int32,
l_linenumber: int32,
- l_suppkey: int32
+ l_quantity: double,
+ l_extendedprice: double,
+ l_discount: double,
+ l_tax: double,
+ l_returnflag: string,
+ l_linestatus: string,
+ l_shipdate: string,
+ l_commitdate: string,
+ l_receiptdate: string,
+ l_shipinstruct: string,
+ l_shipmode: string,
+ l_comment: string
}
-create dataset LineID(LineIDType)
+create dataset LineItem(LineItemType)
partitioned by key l_orderkey, l_linenumber;
-load dataset LineID
+create index part_index on LineItem(l_partkey);
+
+load dataset LineItem
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/empty.adm"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
-load dataset LineID
+load dataset LineItem
using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
write output to nc1:"rttest/dml_empty-load.adm";
-for $c in dataset('LineID')
+for $c in dataset('LineItem')
order by $c.l_orderkey, $c.l_linenumber
limit 1
-return $c
+return $c
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/empty-load-with-index.adm b/asterix-app/src/test/resources/runtimets/results/dml/empty-load-with-index.adm
index 8eabe57..9c4ca31 100644
--- a/asterix-app/src/test/resources/runtimets/results/dml/empty-load-with-index.adm
+++ b/asterix-app/src/test/resources/runtimets/results/dml/empty-load-with-index.adm
@@ -1 +1 @@
-{ "l_orderkey": 1, "l_linenumber": 3, "l_suppkey": 6 }
\ No newline at end of file
+{ "l_orderkey": 1, "l_partkey": 156, "l_suppkey": 4, "l_linenumber": 1, "l_quantity": 17.0d, "l_extendedprice": 17954.55d, "l_discount": 0.04d, "l_tax": 0.02d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-03-13", "l_commitdate": "1996-02-12", "l_receiptdate": "1996-03-22", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "TRUCK", "l_comment": "egular courts above the" }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/empty-load.adm b/asterix-app/src/test/resources/runtimets/results/dml/empty-load.adm
index 8eabe57..9c4ca31 100644
--- a/asterix-app/src/test/resources/runtimets/results/dml/empty-load.adm
+++ b/asterix-app/src/test/resources/runtimets/results/dml/empty-load.adm
@@ -1 +1 @@
-{ "l_orderkey": 1, "l_linenumber": 3, "l_suppkey": 6 }
\ No newline at end of file
+{ "l_orderkey": 1, "l_partkey": 156, "l_suppkey": 4, "l_linenumber": 1, "l_quantity": 17.0d, "l_extendedprice": 17954.55d, "l_discount": 0.04d, "l_tax": 0.02d, "l_returnflag": "N", "l_linestatus": "O", "l_shipdate": "1996-03-13", "l_commitdate": "1996-02-12", "l_receiptdate": "1996-03-22", "l_shipinstruct": "DELIVER IN PERSON", "l_shipmode": "TRUCK", "l_comment": "egular courts above the" }
\ No newline at end of file