merging
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_function_merge@466 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/codepoint-to-string1.aql b/asterix-app/src/test/resources/runtimets/queries/string/codepoint-to-string1.aql
new file mode 100644
index 0000000..a97e441
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/codepoint-to-string1.aql
@@ -0,0 +1,9 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_codepoint-to-string1.adm";
+
+let $x := [20013, 25991, 23383, 31526]
+let $c := codepoint-to-string($x)
+return {"result1": $c}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/codepoint-to-string2.aql b/asterix-app/src/test/resources/runtimets/queries/string/codepoint-to-string2.aql
new file mode 100644
index 0000000..829a082
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/codepoint-to-string2.aql
@@ -0,0 +1,12 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_codepoint-to-string2.adm";
+
+let $x1 := []
+let $c1 := codepoint-to-string($x1)
+
+let $x2 := [97,98,99]
+let $c2 := codepoint-to-string($x2)
+return {"f1": $c1, "f2" : $c2}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/concat1.aql b/asterix-app/src/test/resources/runtimets/queries/string/concat1.aql
new file mode 100644
index 0000000..a6ce63b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/concat1.aql
@@ -0,0 +1,12 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_concat1.adm";
+
+let $x := ["aa", "25991", "bb", "31526"]
+let $c := string-concat($x)
+
+let $x1 := []
+let $c1 := string-concat($x1)
+return {"result1": $c,"result2": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/end-with1.aql b/asterix-app/src/test/resources/runtimets/queries/string/end-with1.aql
new file mode 100644
index 0000000..98e0624
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/end-with1.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_end-with1.adm";
+
+let $c1 := end-with("hello world","werld")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/end-with2.aql b/asterix-app/src/test/resources/runtimets/queries/string/end-with2.aql
new file mode 100644
index 0000000..0e53f94
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/end-with2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_end-with2.adm";
+
+let $c1 := end-with("hello world"," world")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/end-with3.aql b/asterix-app/src/test/resources/runtimets/queries/string/end-with3.aql
new file mode 100644
index 0000000..f71c320
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/end-with3.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_end-with3.adm";
+
+let $c1 := end-with("ends","")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/end-with4.aql b/asterix-app/src/test/resources/runtimets/queries/string/end-with4.aql
new file mode 100644
index 0000000..ca02d57
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/end-with4.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_end-with4.adm";
+
+let $c1 := end-with("ends","ss")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/end-with5.aql b/asterix-app/src/test/resources/runtimets/queries/string/end-with5.aql
new file mode 100644
index 0000000..510beb3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/end-with5.aql
@@ -0,0 +1,14 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_end-with5.adm";
+
+let $c1 := end-with("ends","s")
+let $c2 := end-with("start",null)
+let $c3 := end-with(null,null)
+let $c4 := end-with("",null)
+let $c5 := end-with("","")
+let $c6 := end-with(null,"")
+
+return {"f1": $c1, "f2": $c2, "f3": $c3, "f4": $c4, "f5": $c5, "f6": $c6}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/length.aql b/asterix-app/src/test/resources/runtimets/queries/string/length.aql
new file mode 100644
index 0000000..d78d986
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/length.aql
@@ -0,0 +1,10 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_length.adm";
+
+let $c1 := string-length("hellow")
+let $c2 := string-length("")
+let $c3 := string-length(null)
+return {"result1": $c1, "result2": $c2, "result3": $c3}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/lowercase.aql b/asterix-app/src/test/resources/runtimets/queries/string/lowercase.aql
new file mode 100644
index 0000000..4c45007
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/lowercase.aql
@@ -0,0 +1,10 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_lowercase.adm";
+
+let $c1 := lowercase("HEllow")
+let $c2 := lowercase("")
+let $c3 := lowercase(null)
+return {"result1": $c1, "result2": $c2, "result3": $c3}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/matches1.aql b/asterix-app/src/test/resources/runtimets/queries/string/matches1.aql
new file mode 100644
index 0000000..f81932a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/matches1.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_matches1.adm";
+
+let $c1 := matches("abracadabra","bra")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/matches2.aql b/asterix-app/src/test/resources/runtimets/queries/string/matches2.aql
new file mode 100644
index 0000000..af5246e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/matches2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_matches2.adm";
+
+let $c1 := matches("abracadabra","^a.*a$")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/matches21.aql b/asterix-app/src/test/resources/runtimets/queries/string/matches21.aql
new file mode 100644
index 0000000..19f9591
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/matches21.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_matches21.adm";
+
+let $c1 := matches2("abracadabra","Bra","")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/matches22.aql b/asterix-app/src/test/resources/runtimets/queries/string/matches22.aql
new file mode 100644
index 0000000..b8d7b96
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/matches22.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_matches22.adm";
+
+let $c1 := matches2("abracadabra","Bra","i")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/matches23.aql b/asterix-app/src/test/resources/runtimets/queries/string/matches23.aql
new file mode 100644
index 0000000..508699d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/matches23.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_matches23.adm";
+
+let $c1 := matches2("helloworld","hello world","x")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/matches3.aql b/asterix-app/src/test/resources/runtimets/queries/string/matches3.aql
new file mode 100644
index 0000000..19c6350
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/matches3.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_matches3.adm";
+
+let $c1 := matches("abracadabra","^bra")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/matchesnull.aql b/asterix-app/src/test/resources/runtimets/queries/string/matchesnull.aql
new file mode 100644
index 0000000..8e2f1a1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/matchesnull.aql
@@ -0,0 +1,13 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_matchesnull.adm";
+
+let $c1 := matches("helloworld",null)
+let $c2 := matches("",null)
+let $c3 := matches(null,null)
+let $c4 := matches2("helloworld",null, "")
+let $c5 := matches2("",null, "i")
+let $c6 := matches2(null,null, null)
+return {"result1": $c1, "result2": $c2, "result3": $c3, "result4": $c4, "result5": $c5, "result6": $c6}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/replace1.aql b/asterix-app/src/test/resources/runtimets/queries/string/replace1.aql
new file mode 100644
index 0000000..3a9e932
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/replace1.aql
@@ -0,0 +1,10 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_replace1.adm";
+
+let $c1 := replace("abracadabra", "a", "")
+let $c2 := replace("abracadabra", "a(.)", "a$1$1")
+let $c3 := replace("darted", "^(.*?)d(.*)$", "$1c$2")
+return {"result1": $c1, "result2": $c2, "result3": $c3}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/replace2.aql b/asterix-app/src/test/resources/runtimets/queries/string/replace2.aql
new file mode 100644
index 0000000..9b924f2
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/replace2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_replace2.adm";
+
+let $c1 := replace("abracadabra", "bra", "*")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/replace21.aql b/asterix-app/src/test/resources/runtimets/queries/string/replace21.aql
new file mode 100644
index 0000000..77c0c90
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/replace21.aql
@@ -0,0 +1,10 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_replace21.adm";
+
+let $c1 := replace2("abracadabra","Bra", "kkk" , "")
+let $c2 := replace2("abracadabra","Bra", "kkk" ,"i")
+let $c3 := replace2("helloworld","hello world", "kkk" , "x")
+return {"result1": $c1,"result2": $c2,"result3": $c3}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/replace22.aql b/asterix-app/src/test/resources/runtimets/queries/string/replace22.aql
new file mode 100644
index 0000000..2a0d5d6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/replace22.aql
@@ -0,0 +1,15 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_replace22.adm";
+
+let $c1 := replace2("abracadabra","", null , null)
+let $c2 := replace2("abracadabra","bra", "XXX" ,"")
+let $c3 := replace2(null,"hello world", "XxXx" , "x")
+let $c4 := replace2("abracadabra","bra", "XXX" ,null)
+let $c5 := replace2("abracadabra",null, "XXX" ,null)
+let $c6 := replace2("abracadabra","Bra", null ,"i")
+let $c7 := replace2("abracadabra","Bra", "" ,"i")
+let $c8 := replace2("abracadabra","", "XXX" ,"")
+return {"result1": $c1,"result2": $c2,"result3": $c3,"result4": $c4,"result5": $c5,"result6": $c6,"result7": $c7,"result8": $c8}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/replace3.aql b/asterix-app/src/test/resources/runtimets/queries/string/replace3.aql
new file mode 100644
index 0000000..c1892dd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/replace3.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_replace3.adm";
+
+let $c1 := replace("abracadabra", "a.*a", "*")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/start-with1.aql b/asterix-app/src/test/resources/runtimets/queries/string/start-with1.aql
new file mode 100644
index 0000000..11ac150
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/start-with1.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_start-with1.adm";
+
+let $c1 := start-with("start","st")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/start-with2.aql b/asterix-app/src/test/resources/runtimets/queries/string/start-with2.aql
new file mode 100644
index 0000000..6d02c9a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/start-with2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_start-with2.adm";
+
+let $c1 := start-with("start","t")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/start-with3.aql b/asterix-app/src/test/resources/runtimets/queries/string/start-with3.aql
new file mode 100644
index 0000000..a70dc33
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/start-with3.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_start-with3.adm";
+
+let $c1 := start-with("start","start")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/start-with4.aql b/asterix-app/src/test/resources/runtimets/queries/string/start-with4.aql
new file mode 100644
index 0000000..3629093
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/start-with4.aql
@@ -0,0 +1,14 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_start-with4.adm";
+
+let $c1 := start-with("start","")
+let $c2 := start-with("start",null)
+let $c3 := start-with(null,null)
+let $c4 := start-with("",null)
+let $c5 := start-with("","")
+let $c6 := start-with(null,"")
+
+return {"f1": $c1, "f2": $c2, "f3": $c3, "f4": $c4, "f5": $c5, "f6": $c6}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/start-with5.aql b/asterix-app/src/test/resources/runtimets/queries/string/start-with5.aql
new file mode 100644
index 0000000..33a0b8e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/start-with5.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_start-with5.adm";
+
+let $c1 := start-with("","s")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-concat1.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-concat1.aql
new file mode 100644
index 0000000..b31e33c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-concat1.aql
@@ -0,0 +1,9 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-concat1.adm";
+
+let $x := ["aa", "25991", "bb", "31526"]
+let $c := string-concat($x)
+return {"result1": $c}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-equal1.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-equal1.aql
new file mode 100644
index 0000000..62ec56d
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-equal1.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-equal1.adm";
+
+let $c1 := string-equal("test","tess")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-equal2.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-equal2.aql
new file mode 100644
index 0000000..a102802
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-equal2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-equal2.adm";
+
+let $c1 := string-equal("test","test")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-equal3.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-equal3.aql
new file mode 100644
index 0000000..2749390
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-equal3.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-equal3.adm";
+
+let $c1 := string-equal("test11","test")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-equal4.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-equal4.aql
new file mode 100644
index 0000000..f1cf243
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-equal4.aql
@@ -0,0 +1,11 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-equal4.adm";
+
+let $c1 := string-equal("","")
+let $c3 := string-equal(null,"")
+let $c4 := string-equal("",null)
+let $c5 := string-equal(null,null)
+return {"result1": $c1, "result3": $c3, "result4": $c4, "result5": $c5}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-join1.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-join1.aql
new file mode 100644
index 0000000..0ea2bdd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-join1.aql
@@ -0,0 +1,11 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-join1.adm";
+
+let $x := ["aa", "25991", "bb", "31526"]
+let $s := "::"
+let $c := string-join($x,$s)
+let $c1 := string-join($x,"")
+return {"result0": $c,"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-to-codepoint.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-to-codepoint.aql
new file mode 100644
index 0000000..2f1daba
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-to-codepoint.aql
@@ -0,0 +1,9 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-to-codepoint.adm";
+
+let $x := "abcd"
+let $c := string-to-codepoint($x)
+return {"result1": $c}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/string-to-codepoint1.aql b/asterix-app/src/test/resources/runtimets/queries/string/string-to-codepoint1.aql
new file mode 100644
index 0000000..5bcfd16
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/string-to-codepoint1.aql
@@ -0,0 +1,10 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_string-to-codepoint1.adm";
+
+let $x := ""
+let $c := string-to-codepoint($x)
+
+return {"result1": $c}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring-after-1.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-1.aql
new file mode 100644
index 0000000..6c45bc8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-1.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring-after-1.adm";
+
+let $c1 := substring-after("HEllow","El")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring-after-2.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-2.aql
new file mode 100644
index 0000000..78d6cad
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring-after-2.adm";
+
+let $c1 := substring-after("HEllow","1")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring-after-3.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-3.aql
new file mode 100644
index 0000000..91c3cab
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-3.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring-after-3.adm";
+
+let $c1 := substring-after("HEllow","HEllow")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring-after-4.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-4.aql
new file mode 100644
index 0000000..73a983f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring-after-4.aql
@@ -0,0 +1,12 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring-after-4.adm";
+
+let $c1 := substring-after("HEllow","")
+let $c2 := substring-after("HEllow",null)
+let $c3 := substring-after("",null)
+let $c4 := substring-after("","")
+let $c5 := substring-after(null,null)
+return {"result1": $c1, "result2": $c2, "result3": $c3, "result4": $c4, "result5": $c5}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring-before-1.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring-before-1.aql
new file mode 100644
index 0000000..1fe3a36
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring-before-1.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring-before-1.adm";
+
+let $c1 := substring-before("HEllow","ll")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring-before-2.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring-before-2.aql
new file mode 100644
index 0000000..4f59c43
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring-before-2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring-before-2.adm";
+
+let $c1 := substring-before("HEllow","HEllow")
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring-before-3.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring-before-3.aql
new file mode 100644
index 0000000..9e40615
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring-before-3.aql
@@ -0,0 +1,12 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring-before-3.adm";
+
+let $c1 := substring-before("HEllow","")
+let $c2 := substring-before("HEllow",null)
+let $c3 := substring-before("",null)
+let $c4 := substring-before("","")
+let $c5 := substring-before(null,null)
+return {"result1": $c1, "result2": $c2, "result3": $c3, "result4": $c4, "result5": $c5}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring2-1.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring2-1.aql
new file mode 100644
index 0000000..78beb56
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring2-1.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring2-1.adm";
+
+let $c1 := substring2("HEllow",2)
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring2-2.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring2-2.aql
new file mode 100644
index 0000000..b310c9f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring2-2.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring2-2.adm";
+
+let $c1 := substring2("HEllow",0)
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring2-3.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring2-3.aql
new file mode 100644
index 0000000..70725b6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring2-3.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring2-3.adm";
+
+let $c1 := substring2("HEllow",10)
+return {"result1": $c1}
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substring2-4.aql b/asterix-app/src/test/resources/runtimets/queries/string/substring2-4.aql
new file mode 100644
index 0000000..1a1065a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substring2-4.aql
@@ -0,0 +1,8 @@
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+write output to nc1:"rttest/string_substring2-4.adm";
+
+let $c1 := substring2("HEllow",-1)
+return {"result1": $c1}