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/runtimets/queries/subset-collection/01.aql b/asterix-app/src/test/resources/runtimets/queries/subset-collection/01.aql
new file mode 100644
index 0000000..a6083b1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/subset-collection/01.aql
@@ -0,0 +1,12 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/subset-collection_01.adm";
+
+for $l in subset-collection([1], 0, 1)
+return $l
+/*
+output: 
+1
+*/
diff --git a/asterix-app/src/test/resources/runtimets/queries/subset-collection/02.aql b/asterix-app/src/test/resources/runtimets/queries/subset-collection/02.aql
new file mode 100644
index 0000000..8069ee5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/subset-collection/02.aql
@@ -0,0 +1,13 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/subset-collection_02.adm";
+
+for $l in subset-collection([1, 2, 3, 4], 1, 2)
+return $l
+/*
+output: 
+2
+3
+*/
diff --git a/asterix-app/src/test/resources/runtimets/queries/subset-collection/03.aql b/asterix-app/src/test/resources/runtimets/queries/subset-collection/03.aql
new file mode 100644
index 0000000..17b54d0
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/subset-collection/03.aql
@@ -0,0 +1,12 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/subset-collection_03.adm";
+
+for $l in subset-collection([1, 2, 3, 4], 0, 0)
+return $l
+/*
+output: 
+EMPTY
+*/
diff --git a/asterix-app/src/test/resources/runtimets/queries/subset-collection/04.aql b/asterix-app/src/test/resources/runtimets/queries/subset-collection/04.aql
new file mode 100644
index 0000000..97babb9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/subset-collection/04.aql
@@ -0,0 +1,12 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/subset-collection_04.adm";
+
+for $l in [1]
+return subset-collection([1, 2, 3, 4], 1, 2)
+/*
+edu.uci.ics.asterix.common.exceptions.AsterixException: Trying to create an aggregate from a scalar function descriptor. (fid=subset-collection@3)
+        at edu.uci.ics.asterix.algebra.expressions.FunctionCallExpression.createEvaluatorFactory(FunctionCallExpression.java:85)
+*/
diff --git a/asterix-app/src/test/resources/runtimets/queries/subset-collection/05.aql b/asterix-app/src/test/resources/runtimets/queries/subset-collection/05.aql
new file mode 100644
index 0000000..8be1211
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/subset-collection/05.aql
@@ -0,0 +1,13 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/subset-collection_05.adm";
+
+for $l in subset-collection(['a', 'b', 'c', 'd'], 1, 2)
+return $l
+/*
+output:
+"b"
+"c"
+*/
diff --git a/asterix-app/src/test/resources/runtimets/queries/subset-collection/06.aql b/asterix-app/src/test/resources/runtimets/queries/subset-collection/06.aql
new file mode 100644
index 0000000..1569d5a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/subset-collection/06.aql
@@ -0,0 +1,13 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/subset-collection_06.adm";
+
+for $l in subset-collection([1, 2, 3, 4], 2, 2)
+return $l
+/*
+output:
+3
+4
+*/
diff --git a/asterix-app/src/test/resources/runtimets/queries/subset-collection/07.aql b/asterix-app/src/test/resources/runtimets/queries/subset-collection/07.aql
new file mode 100644
index 0000000..49a9d6a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/subset-collection/07.aql
@@ -0,0 +1,13 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/subset-collection_07.adm";
+
+for $l in subset-collection([1, 2, 3, 4], 2, 10)
+return $l
+/*
+output:
+3
+4
+*/