Fix for issue 252 and 253

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_issue_252_253@1182 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv01.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv01.aql
index e95d102..eaec65a 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv01.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv01.aql
@@ -30,10 +30,10 @@
 dept : string
 }
 
-create dataset student.ugdstd(stdType) partitioned by key id;
-create dataset student.gdstd(stdType) partitioned by key id;
-create dataset teacher.prof(tchrType) partitioned by key id;
-create dataset teacher.pstdoc(tchrType) partitioned by key id;
+create dataset student.ugdstd(stdType) primary key id;
+create dataset student.gdstd(stdType) primary key id;
+create dataset teacher.prof(tchrType) primary key id;
+create dataset teacher.pstdoc(tchrType) primary key id;
 
 insert into dataset student.ugdstd({"id":457,"name":"John Doe","age":22,"sex":"M","dept":"Dance"});
 
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv02.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv02.aql
index 1257cac..4ab7c29 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv02.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv02.aql
@@ -30,10 +30,10 @@
 dept : string
 }
 
-create dataset student.ugdstd(stdType) partitioned by key id;
-create dataset student.gdstd(stdType) partitioned by key id;
-create dataset teacher.prof(tchrType) partitioned by key id;
-create dataset teacher.pstdoc(tchrType) partitioned by key id;
+create dataset student.ugdstd(stdType) primary key id;
+create dataset student.gdstd(stdType) primary key id;
+create dataset teacher.prof(tchrType) primary key id;
+create dataset teacher.pstdoc(tchrType) primary key id;
 
 insert into dataset student.ugdstd({"id":457,"name":"John Doe","age":22,"sex":"M","dept":"Dance"});
 
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv03.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv03.aql
index 0c80540..a68d428 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv03.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv03.aql
@@ -32,10 +32,10 @@
 dept : string
 }
 
-create dataset student.ugdstd(stdType) partitioned by key id;
-create dataset student.gdstd(stdType) partitioned by key id;
-create dataset teacher.prof(tchrType) partitioned by key id;
-create dataset teacher.pstdoc(tchrType) partitioned by key id;
+create dataset student.ugdstd(stdType) primary key id;
+create dataset student.gdstd(stdType) primary key id;
+create dataset teacher.prof(tchrType) primary key id;
+create dataset teacher.pstdoc(tchrType) primary key id;
 
 drop dataset student.ugdstd;
 drop dataset student.gdstd;
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv04.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv04.aql
index 20be103..55a3fa0 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv04.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv04.aql
@@ -33,20 +33,20 @@
 dept : string
 }
 
-create dataset student.ugdstd(stdType) partitioned by key id;
-create dataset student.gdstd(stdType) partitioned by key id;
-create dataset teacher.prof(tchrType) partitioned by key id;
-create dataset teacher.pstdoc(tchrType) partitioned by key id;
+create dataset student.ugdstd(stdType) primary key id;
+create dataset student.gdstd(stdType) primary key id;
+create dataset teacher.prof(tchrType) primary key id;
+create dataset teacher.pstdoc(tchrType) primary key id;
 
 drop dataset student.ugdstd;
 drop dataset student.gdstd;
 drop dataset teacher.prof;
 drop dataset teacher.pstdoc;
 
-create dataset student.ugdstd(stdType) partitioned by key id;
-create dataset student.gdstd(stdType) partitioned by key id;
-create dataset teacher.prof(tchrType) partitioned by key id;
-create dataset teacher.pstdoc(tchrType) partitioned by key id;
+create dataset student.ugdstd(stdType) primary key id;
+create dataset student.gdstd(stdType) primary key id;
+create dataset teacher.prof(tchrType) primary key id;
+create dataset teacher.pstdoc(tchrType) primary key id;
 
 for $l in dataset('Metadata.Dataset')
 where $l.DataverseName='student' or $l.DataverseName='teacher'
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv07.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv07.aql
index 4bba053..25e5d67 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv07.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv07.aql
@@ -18,7 +18,7 @@
 dept:string
 }
 
-create dataset test.employee(Emp) partitioned by key id;
+create dataset test.employee(Emp) primary key id;
 
 load dataset test.employee
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08.aql
index 10985e3..8b4a32d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv08.aql
@@ -22,8 +22,8 @@
 id : int32
 }
 
-create dataset test.t1(testtype) partitioned by key id;
-create dataset fest.t1(testtype) partitioned by key id;
+create dataset test.t1(testtype) primary key id;
+create dataset fest.t1(testtype) primary key id;
 
 insert into dataset test.t1({"id":24});
 insert into dataset test.t1({"id":23});
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17.aql
index 26556e0..8e42043 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv17.aql
@@ -20,8 +20,8 @@
 id : int32
 }
 
-create dataset test.t1(testtype) partitioned by key id;
-create dataset fest.t1(testtype) partitioned by key id;
+create dataset test.t1(testtype) primary key id;
+create dataset fest.t1(testtype) primary key id;
 
 insert into dataset test.t1({"id":24});
 insert into dataset test.t1({"id":23});
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18.aql
index 0d3bd53..69dd67d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv18.aql
@@ -21,8 +21,8 @@
 id : int32
 }
 
-create dataset test.t1(testtype) partitioned by key id;
-create dataset fest.t1(testtype) partitioned by key id;
+create dataset test.t1(testtype) primary key id;
+create dataset fest.t1(testtype) primary key id;
 
 insert into dataset test.t1({"id":24});
 insert into dataset test.t1({"id":23});
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19.aql
index 335f11c..6a0cf97 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/cross-dv19.aql
@@ -33,17 +33,17 @@
   text: string
 }
 
-create dataset test1.t1(testtype) partitioned by key id;
+create dataset test1.t1(testtype) primary key id;
 
-create dataset test2.t2(testtype) partitioned by key id;
+create dataset test2.t2(testtype) primary key id;
 
-create dataset test2.t3(testtype) partitioned by key id;
+create dataset test2.t3(testtype) primary key id;
 
-create dataset test1.t2(testtype) partitioned by key id;
+create dataset test1.t2(testtype) primary key id;
 
-create dataset test1.t3(testtype) partitioned by key id;
+create dataset test1.t3(testtype) primary key id;
 
-create dataset test2.t4(testtype) partitioned by key id;
+create dataset test2.t4(testtype) primary key id;
 
 create external dataset test1.TwitterData(Tweet)
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset.aql
index 7b14957..860dd74 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/drop_dataset.aql
@@ -20,7 +20,7 @@
 };
 
 create dataset test.Customers(CustomerType)
-partitioned by key cid;
+primary key cid;
 
 drop dataset test.Customers;
 
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses.aql
index 7eebbaf..2395a48 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_across_dataverses.aql
@@ -42,10 +42,10 @@
 };
 
 create dataset test1.Customers(CustomerType)
-partitioned by key cid;
+primary key cid;
 
 create dataset test2.Customers(CustomerType)
-partitioned by key cid;
+primary key cid;
 
 load dataset test1.Customers
 using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset.aql
index 89180ef..3c96539 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/insert_from_source_dataset.aql
@@ -14,7 +14,7 @@
 
 write output to nc1:"rttest/cross-dataverse_insert_from_source_dataset.adm";
 
-create dataset test.t1(testtype) partitioned by key id;
+create dataset test.t1(testtype) primary key id;
 
 insert into dataset test.t1({"id":456,"name":"Roger"});
 insert into dataset test.t1({"id":351,"name":"Bob"});
@@ -22,7 +22,7 @@
 insert into dataset test.t1({"id":926,"name":"Richard"});
 insert into dataset test.t1({"id":482,"name":"Kevin"});
 
-create dataset test.t2(testtype) partitioned by key id;
+create dataset test.t2(testtype) primary key id;
 
 insert into dataset test.t2({"id":438,"name":"Ravi"});
 insert into dataset test.t2({"id":321,"name":"Bobby"});
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses.aql b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses.aql
index d09755a..8266c79 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/join_across_dataverses.aql
@@ -25,7 +25,7 @@
 };
 
 create dataset test1.Customers(CustomerType)
-partitioned by key cid;
+primary key cid;
 
 
 create type test2.OrderType as open {
@@ -39,7 +39,7 @@
 }
 
 create dataset test2.Orders(OrderType)
-partitioned by key oid;
+primary key oid;
 
 
 load dataset test1.Customers