committing additional tests covering user defined functions

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@872 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf01.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf01.aql
similarity index 83%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf01.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf01.aql
index b4c3e11..35718b1 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf01.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf01.aql
@@ -8,7 +8,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf01.adm";
+write output to nc1:"rttest/user-defined-functions_udf01.adm";
 
 create function test.echo($list){
 $list
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf02.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf02.aql
similarity index 83%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf02.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf02.aql
index 7e816c5..2605f7a 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf02.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf02.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf02.adm";
+write output to nc1:"rttest/user-defined-functions_udf02.adm";
 
 create function test.getFirst($list){
 $list[0]
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf03.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf03.aql
similarity index 78%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf03.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf03.aql
index c479b1b..747f29d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf03.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf03.aql
@@ -5,12 +5,12 @@
  * Ignored      : Not part of test build due to Issue 200
  */
 
-// This test is returning NPE...
+// This test is returning NPE... Issue 200 
 
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf03.adm";
+write output to nc1:"rttest/user-defined-functions_udf03.adm";
 
 create function test.echo($list){
 $list
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf04.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf04.aql
similarity index 86%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf04.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf04.aql
index 088b97e..bd6544f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf04.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf04.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf04.adm";
+write output to nc1:"rttest/user-defined-functions_udf04.adm";
 
 create function test.echo($list){
 $list
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf05.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf05.aql
similarity index 81%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf05.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf05.aql
index 1e393f3..2429f1c 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf05.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf05.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf05.adm";
+write output to nc1:"rttest/user-defined-functions_udf05.adm";
 
 create function test.echo($a){
 $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf06.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf06.aql
similarity index 79%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf06.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf06.aql
index 9e736bd..3301d5c 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf06.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf06.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf06.adm";
+write output to nc1:"rttest/user-defined-functions_udf06.adm";
 
 create function test.echo($a){
 $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf07.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf07.aql
similarity index 79%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf07.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf07.aql
index 1e74e96..0280e92 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf07.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf07.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf07.adm";
+write output to nc1:"rttest/user-defined-functions_udf07.adm";
 
 create function test.echo($a){
 $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf08.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf08.aql
similarity index 80%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf08.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf08.aql
index 42e6f22..5dfb9a2 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf08.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf08.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf08.adm";
+write output to nc1:"rttest/user-defined-functions_udf08.adm";
 
 create function test.echo($a){
 $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf09.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf09.aql
similarity index 91%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf09.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf09.aql
index 33e8e52..b16e2dd 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf09.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf09.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf09.adm";
+write output to nc1:"rttest/user-defined-functions_udf09.adm";
 
 create type test.TestType as open {
 id : int32
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf10.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf10.aql
similarity index 84%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf10.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf10.aql
index 739bc05..d0da4e1 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf10.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf10.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf10.adm";
+write output to nc1:"rttest/user-defined-functions_udf10.adm";
 
 create function test.echo($uolist){
 $uolist
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf11.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf11.aql
similarity index 81%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf11.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf11.aql
index 1395cfa..b842c93 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf11.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf11.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf11.adm";
+write output to nc1:"rttest/user-defined-functions_udf11.adm";
 
 create function test.OList(){
 [1,2,3,4,5,6,7,8,9,10]
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf12.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf12.aql
similarity index 78%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf12.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf12.aql
index ad710eb..e3f8122 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf12.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf12.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf12.adm";
+write output to nc1:"rttest/user-defined-functions_udf12.adm";
 
 create function test.foo($a,$b) {
 $a+$b
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf13.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf13.aql
similarity index 79%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf13.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf13.aql
index c48acf7..533def7 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf13.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf13.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf13.adm";
+write output to nc1:"rttest/user-defined-functions_udf13.adm";
 
 create function test.foo($a,$b) {
 $a - $b
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf14.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf14.aql
similarity index 79%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf14.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf14.aql
index 66d362f..fc3447d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf14.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf14.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf14.adm";
+write output to nc1:"rttest/user-defined-functions_udf14.adm";
 
 create function test.foo($a,$b) {
 $a*$b
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf15.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf15.aql
similarity index 81%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf15.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf15.aql
index 55cc519..4b4992a 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf15.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf15.aql
@@ -6,12 +6,12 @@
  * Ignored      : Not part of current tests because of Issue 200
  */
 
-// this test resturns NPE
+// this test resturns NPE:Issue 166
 
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf15.adm";
+write output to nc1:"rttest/user-defined-functions_udf15.adm";
 
 create function test.OList2(){
 [[1,2,3,4,5,6,7,8,9,10],["a","b","c","d","e","f","g","h","y"]]
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf16.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf16.aql
similarity index 84%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf16.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf16.aql
index 5b7d4ef..e9f0742 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf16.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf16.aql
@@ -8,7 +8,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf16.adm";
+write output to nc1:"rttest/user-defined-functions_udf16.adm";
 
 create function test.fn02(){
 "Welcome to the world of Asterix"
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf17.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf17.aql
similarity index 86%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf17.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf17.aql
index 89fb567..b98d123 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf17.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf17.aql
@@ -8,7 +8,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf17.adm";
+write output to nc1:"rttest/user-defined-functions_udf17.adm";
 
 create function test.parent(){
 test.child()
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf18.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf18.aql
similarity index 81%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf18.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf18.aql
index 14791b7..aa6a57b 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf18.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf18.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf18.adm";
+write output to nc1:"rttest/user-defined-functions_udf18.adm";
 
 create function test.fn06(){
 false
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf19.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf19.aql
similarity index 85%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf19.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf19.aql
index bf024c7..87c39a5 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf19.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf19.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf19.adm";
+write output to nc1:"rttest/user-defined-functions_udf19.adm";
 
 create function test.pie(){
 3.14
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf20.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf20.aql
similarity index 86%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf20.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf20.aql
index dfc9610..e0a16a1 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf20.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf20.aql
@@ -8,7 +8,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf20.adm";
+write output to nc1:"rttest/user-defined-functions_udf20.adm";
 
 create function test.pie(){
 3.14
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf21.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf21.aql
similarity index 83%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf21.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf21.aql
index 4212b04..7e943c3 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf21.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf21.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf21.adm";
+write output to nc1:"rttest/user-defined-functions_udf21.adm";
 
 create function test.isOdd($b){
 $b%2 != 0
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf22.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf22.aql
similarity index 84%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf22.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf22.aql
index a34e129..83e19e6 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf22.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf22.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf22.adm";
+write output to nc1:"rttest/user-defined-functions_udf22.adm";
 
 create function test.getFullName($fname,$lname){
 string-concat([$fname,$lname])
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf23.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf23.aql
similarity index 81%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf23.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf23.aql
index 1c5ca12..a2d8ec5 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf23.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf23.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf23.adm";
+write output to nc1:"rttest/user-defined-functions_udf23.adm";
 
 create function test.numRows(){
 6
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf24.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf24.aql
similarity index 74%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf24.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf24.aql
index 9de03b7..eef906d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf24.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf24.aql
@@ -5,12 +5,12 @@
  * Ignored      : Not part of current test build because of Issue 201
  */
 
-// Returns java.lang.ClassCastException
+// Returns java.lang.ClassCastException : Issue 195
 
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf24.adm";
+write output to nc1:"rttest/user-defined-functions_udf24.adm";
 
 create function test.myRangeFn($n)
 {
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf25.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf25.aql
similarity index 85%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf25.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf25.aql
index 5b70889..fefc07e 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf25.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf25.aql
@@ -9,7 +9,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf25.adm";
+write output to nc1:"rttest/user-defined-functions_udf25.adm";
 
 create function test.computeBonus($pbcRating,$salary)
 {
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf26.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf26.aql
similarity index 80%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf26.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf26.aql
index 9f460bc..95420b7 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf26.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf26.aql
@@ -7,7 +7,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf26.adm";
+write output to nc1:"rttest/user-defined-functions_udf26.adm";
 
 create function test.needs_f1($x){
  $x + f1()
diff --git a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf27.aql b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf27.aql
similarity index 85%
rename from asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf27.aql
rename to asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf27.aql
index c50b3dc..b9db17f 100644
--- a/asterix-app/src/test/resources/runtimets/queries/cross-dataverse/udf27.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/user-defined-functions/udf27.aql
@@ -10,7 +10,7 @@
 drop dataverse test if exists;
 create dataverse test;
 
-write output to nc1:"rttest/cross-dataverse_udf27.adm";
+write output to nc1:"rttest/user-defined-functions_udf27.adm";
 
 create function test.f1(){
 100
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf01.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf01.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf01.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf01.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf02.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf02.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf02.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf02.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf03.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf03.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf03.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf03.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf04.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf04.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf04.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf04.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf05.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf05.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf05.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf05.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf06.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf06.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf06.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf06.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf07.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf07.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf07.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf07.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf08.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf08.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf08.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf08.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf09.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf09.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf09.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf09.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf10.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf10.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf10.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf10.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf11.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf11.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf11.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf11.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf12.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf12.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf12.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf12.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf13.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf13.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf13.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf13.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf14.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf14.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf14.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf14.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf16.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf16.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf16.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf16.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf17.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf17.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf17.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf17.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf18.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf18.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf18.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf18.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf19.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf19.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf19.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf19.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf20.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf20.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf20.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf20.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf21.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf21.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf21.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf21.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf22.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf22.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf22.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf22.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf23.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf23.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf23.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf23.adm
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf27.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf27.adm
similarity index 100%
rename from asterix-app/src/test/resources/runtimets/results/cross-dataverse/udf27.adm
rename to asterix-app/src/test/resources/runtimets/results/user-defined-functions/udf27.adm
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index d7e1b30..6bed5b3 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -3537,5 +3537,161 @@
         <output-file compare="Text">cross-dv19.adm</output-file>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="cross-dataverse">
+      <compilation-unit name="insert_across_dataverses">
+        <output-file compare="Text">insert_across_dataverses.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="cross-dataverse">
+      <compilation-unit name="join_across_dataverses">
+        <output-file compare="Text">join_across_dataverses.adm</output-file>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="user-defined-functions">
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf01">
+        <output-file compare="Text">udf01.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf02">
+        <output-file compare="Text">udf02.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <!-- causes NPE: Issue 200
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf03">
+        <output-file compare="Text">udf03.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    -->
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf04">
+        <output-file compare="Text">udf04.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf05">
+        <output-file compare="Text">udf05.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf06">
+        <output-file compare="Text">udf06.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf07">
+        <output-file compare="Text">udf07.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf08">
+        <output-file compare="Text">udf08.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf09">
+        <output-file compare="Text">udf09.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf10">
+        <output-file compare="Text">udf10.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf11">
+        <output-file compare="Text">udf11.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf12">
+        <output-file compare="Text">udf12.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf13">
+        <output-file compare="Text">udf13.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf14">
+        <output-file compare="Text">udf14.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <!-- Issue 166
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf15">
+        <output-file compare="Text">udf15.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    -->
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf16">
+        <output-file compare="Text">udf16.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf17">
+        <output-file compare="Text">udf17.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf18">
+        <output-file compare="Text">udf18.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf19">
+        <output-file compare="Text">udf19.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf20">
+        <output-file compare="Text">udf20.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf21">
+        <output-file compare="Text">udf21.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf22">
+        <output-file compare="Text">udf22.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf23">
+        <output-file compare="Text">udf23.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    <!-- Issue 195
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf24">
+        <output-file compare="Text">udf24.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    -->
+    <!-- Issue 218
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf25">
+        <output-file compare="Text">udf25.adm</output-file>
+      </compilation-unit>
+    </test-case>
+    -->
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf26">
+        <output-file compare="Text">udf26.adm</output-file>
+        <expected-error>edu.uci.ics.asterix.common.exceptions.AsterixException: unknown function test.f1@0</expected-error>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="user-defined-functions">
+      <compilation-unit name="udf27">
+        <output-file compare="Text">udf27.adm</output-file>
+      </compilation-unit>
+    </test-case>
   </test-group>
 </test-suite>