Added asterix project

git-svn-id: https://asterixdb.googlecode.com/svn/trunk/asterix@12 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/integration/queries/dataset-scan.aql b/asterix-app/src/test/resources/integration/queries/dataset-scan.aql
new file mode 100644
index 0000000..1930be2
--- /dev/null
+++ b/asterix-app/src/test/resources/integration/queries/dataset-scan.aql
@@ -0,0 +1,28 @@
+use dataverse demo0927;
+
+declare type CustomerType as closed {
+  cid: int32, 
+  name: string,
+  age: int32?,
+  address: AddressType?,
+  lastorder: {
+    oid: int32,
+    total: float
+  }
+}
+
+declare type AddressType as closed {
+  number: int32, 
+  street: string,
+  city: string
+}
+
+declare nodegroup group1 on nc1, nc2;
+
+declare dataset Customers(CustomerType) 
+  partitioned by key cid on group1;
+
+for $c in dataset('Customers')
+return $c
+// { "custname":$c.name }
+
diff --git a/asterix-app/src/test/resources/integration/queries/retrecord.aql b/asterix-app/src/test/resources/integration/queries/retrecord.aql
new file mode 100644
index 0000000..910fbf0
--- /dev/null
+++ b/asterix-app/src/test/resources/integration/queries/retrecord.aql
@@ -0,0 +1,8 @@
+declare function samecust($cust, $ord)
+{$cust.cid = $ord.cid}
+
+for $c in recordset(['cid', 'int32', 'name', 'string', 'age', 'int32'], 'osfiles', ['nc1', 'data/spj01/cust1.adm'], ['nc2', 'data/spj01/cust2.adm'])
+for $o in recordset(['oid', 'int32', 'date', 'int32', 'cid', 'int32', 'total', 'float'], 'osfiles', ['nc1', 'data/spj01/ord1.adm'], ['nc2', 'data/spj01/ord2.adm'])
+where samecust($c, $o)
+return { "customer":$c, "order":$o } 
+
diff --git a/asterix-app/src/test/resources/integration/queries/underpayment1-recordset.aql b/asterix-app/src/test/resources/integration/queries/underpayment1-recordset.aql
new file mode 100644
index 0000000..8f5bd8e
--- /dev/null
+++ b/asterix-app/src/test/resources/integration/queries/underpayment1-recordset.aql
@@ -0,0 +1,5 @@
+for $p in recordset(['pid', 'int32', 'oid', 'int32', 'value', 'float'], 'osfiles', ['nc1', 'data/spj01/payment1.adm'], ['nc2', 'data/spj01/payment2.adm'])
+for $o in recordset(['oid', 'int32', 'date', 'int32', 'cid', 'int32', 'total', 'float'], 'osfiles', ['nc1', 'data/spj01/ord1.adm'], ['nc2', 'data/spj01/ord2.adm'])
+where $o.oid = $p.oid and $o.total > $p.value
+return 
+{ "order-id": $o.oid, "balance": $o.total - $p.value }
diff --git a/asterix-app/src/test/resources/integration/updates/load-dataset.aql b/asterix-app/src/test/resources/integration/updates/load-dataset.aql
new file mode 100644
index 0000000..c6faa6e
--- /dev/null
+++ b/asterix-app/src/test/resources/integration/updates/load-dataset.aql
@@ -0,0 +1,22 @@
+use dataverse demo0927;
+
+declare type CustomerType as closed {
+  cid: int32, 
+  name: string,
+  age: int32
+}
+
+declare type AddressType as closed {
+  number: int32, 
+  street: string,
+  city: string
+}
+
+declare nodegroup group1 on nc1, nc2;
+
+declare dataset Customers(CustomerType) 
+  partitioned by key cid on group1;
+
+load dataset Customers 
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/spj01/cust1.adm"),("format"="adm")) pre-sorted;