asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject [5/5] asterixdb git commit: Add several builtin functions.
Date Thu, 25 Aug 2016 19:47:57 GMT
Add several builtin functions.

- add functions such as greatest, least, concat(||), initcap(title),
  regexp_contains, regexp_like, regexp_position, regexp_replace, ltrim,
  trim, rtrim, position;
- refactor string functions;
- remove undocumented function "regexp", which is equivalent to "matches";
- remove AQL.html and SQLPP.html since they are generated in "target/".

Change-Id: I26351af22f67d66b56176f55b29a4e7ff63583f7
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1104
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/fdc71eb7
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/fdc71eb7
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/fdc71eb7

Branch: refs/heads/master
Commit: fdc71eb7469078511d5553785a999f1df1963fae
Parents: 437d819
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Wed Aug 24 22:41:57 2016 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Thu Aug 25 12:47:23 2016 -0700

----------------------------------------------------------------------
 .../translator/util/FunctionCollection.java     |  42 +-
 .../q19_discounted_revenue.3.query.aql          |  12 +-
 .../q19_discounted_revenue.3.query.aql          |  14 +-
 .../greatest_mixed/greatest_mixed.3.query.sqlpp |  21 +
 .../least_mixed/least_mixed.1.query.sqlpp       |  21 +
 .../concat_func/concat_func.1.query.sqlpp       |  25 +
 .../concat_pipe/concat_pipe.1.query.sqlpp       |  25 +
 .../concat_pipe_multi.1.query.sqlpp             |  25 +
 .../string/initcap/initcap.1.query.sqlpp        |  26 +
 .../string/ltrim/ltrim.1.query.sqlpp            |  37 +
 .../string/position/position.1.query.sqlpp      |  23 +
 .../regexp_contains.1.query.sqlpp               |  39 +
 .../regexp_contains.1.query.sqlpp               |  20 +
 .../regexp_like/regexp_like.1.query.sqlpp       |  41 +
 .../regexp_like_with_flag.1.query.sqlpp         |  20 +
 .../regexp_position.1.query.sqlpp               |  39 +
 .../regexp_position_with_flag.1.query.sqlpp     |  20 +
 .../regexp_replace/regexp_replace.1.query.sqlpp |  31 +
 .../string/rtrim/rtrim.1.query.sqlpp            |  37 +
 .../string/title/title.1.query.sqlpp            |  26 +
 .../string/trim/trim.1.query.sqlpp              |  37 +
 .../q19_discounted_revenue.3.query.sqlpp        |   4 +-
 .../q19_discounted_revenue.3.query.sqlpp        |  12 +-
 .../q19_discounted_revenue.3.query.sqlpp        |  12 +-
 .../q19_discounted_revenue.3.query.sqlpp        |   4 +-
 .../q19_discounted_revenue.3.query.sqlpp        |   2 +-
 .../greatest_mixed/greatest_mixed.1.adm         |   1 +
 .../comparison/least_mixed/least_mixed.1.adm    |   1 +
 .../concat_pipe_multi/concat_pipe_multi.1.adm   |   1 +
 .../results/string/initcap/initcap.1.adm        |   1 +
 .../runtimets/results/string/ltrim/ltrim.1.adm  |   1 +
 .../results/string/position/position.1.adm      |   1 +
 .../string/regexp_like/regexp_like.1.adm        |  17 +
 .../regexp_position/regexp_position.1.adm       |  15 +
 .../regexp_position_with_flag.1.adm             |   1 +
 .../runtimets/results/string/rtrim/rtrim.1.adm  |   1 +
 .../runtimets/results/string/trim/trim.1.adm    |   1 +
 .../q19_discounted_revenue.3.ast                |  12 +-
 .../q19_discounted_revenue.3.ast                |  12 +-
 .../resources/runtimets/testsuite_sqlpp.xml     |  90 ++
 .../asterix-lang-aql/src/main/javacc/AQL.html   | 774 ----------------
 .../lang/common/struct/OperatorType.java        |   1 +
 .../rewrites/SqlppFunctionBodyRewriter.java     |   3 +
 .../lang/sqlpp/rewrites/SqlppQueryRewriter.java |  12 +
 .../visitor/OperatorExpressionVisitor.java      |  42 +-
 .../SqlppListInputFunctionRewriteVisitor.java   |  48 +
 .../lang/sqlpp/util/FunctionMapUtil.java        |  40 +-
 .../src/main/javacc/SQLPP.html                  | 917 -------------------
 .../asterix-lang-sqlpp/src/main/javacc/SQLPP.jj |  39 +-
 .../om/functions/AsterixBuiltinFunctions.java   |  40 +-
 .../impl/StringInt32TypeComputer.java           |  37 +
 .../functions/AbstractBinaryStringBoolEval.java |  71 +-
 .../functions/AbstractBinaryStringEval.java     | 115 +++
 .../functions/AbstractBinaryStringIntEval.java  |  68 ++
 .../AbstractBinaryStringStringEval.java         |  74 ++
 .../functions/AbstractQuadStringStringEval.java |  10 +-
 .../functions/AbstractTripleStringBoolEval.java |  80 +-
 .../functions/AbstractTripleStringEval.java     | 130 +++
 .../functions/AbstractTripleStringIntEval.java  |  72 ++
 .../AbstractTripleStringStringEval.java         |  85 +-
 .../AbstractUnaryStringStringEval.java          |  98 ++
 .../evaluators/functions/RegExpDescriptor.java  | 169 ----
 .../functions/StringContainsDescriptor.java     |   5 +-
 .../functions/StringEndsWithDescriptor.java     |   5 +-
 .../functions/StringEqualDescriptor.java        |   5 +-
 .../functions/StringInitCapDescriptor.java      |  69 ++
 .../functions/StringLTrim2Descriptor.java       |  74 ++
 .../functions/StringLTrimDescriptor.java        |  72 ++
 .../functions/StringLikeDescriptor.java         |  48 +-
 .../functions/StringLowerCaseDescriptor.java    |  51 +-
 .../functions/StringMatchesDescriptor.java      |  97 --
 .../StringMatchesWithFlagDescriptor.java        | 107 ---
 .../functions/StringPositionDescriptor.java     |  70 ++
 .../functions/StringRTrim2Descriptor.java       |  75 ++
 .../functions/StringRTrimDescriptor.java        |  72 ++
 .../StringRegExpContainsDescriptor.java         |  72 ++
 .../StringRegExpContainsWithFlagDescriptor.java |  76 ++
 .../functions/StringRegExpLikeDescriptor.java   |  73 ++
 .../StringRegExpLikeWithFlagDescriptor.java     |  73 ++
 .../StringRegExpPositionDescriptor.java         |  73 ++
 .../StringRegExpPositionWithFlagDescriptor.java |  73 ++
 .../StringRegExpReplaceDescriptor.java          |  72 ++
 .../StringRegExpReplaceWithFlagsDescriptor.java |  72 ++
 .../functions/StringReplaceDescriptor.java      | 109 ---
 .../StringReplaceWithFlagsDescriptor.java       | 121 ---
 .../functions/StringStartsWithDescriptor.java   |   5 +-
 .../functions/StringTrim2Descriptor.java        |  74 ++
 .../functions/StringTrimDescriptor.java         |  73 ++
 .../functions/StringUpperCaseDescriptor.java    |  51 +-
 .../functions/utils/RegExpMatcher.java          | 185 ++++
 .../functions/utils/StringTrimmer.java          | 104 +++
 .../data/std/primitive/UTF8StringPointable.java | 122 +++
 .../std/primitive/UTF8StringPointableTest.java  | 109 ++-
 93 files changed, 3282 insertions(+), 2700 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
index ee4dc32..a1746cc 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/util/FunctionCollection.java
@@ -190,7 +190,6 @@ import org.apache.asterix.runtime.evaluators.functions.NumericUnaryMinusDescript
 import org.apache.asterix.runtime.evaluators.functions.OrDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.OrderedListConstructorDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.PrefixLenJaccardDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.RegExpDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.SimilarityJaccardCheckDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.SimilarityJaccardDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.SimilarityJaccardPrefixCheckDescriptor;
@@ -205,16 +204,28 @@ import org.apache.asterix.runtime.evaluators.functions.StringConcatDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringContainsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringEndsWithDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringEqualDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringInitCapDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringJoinDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringLTrim2Descriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringLTrimDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringLengthDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringLikeDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringLowerCaseDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.StringMatchesDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.StringMatchesWithFlagDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.StringReplaceDescriptor;
-import org.apache.asterix.runtime.evaluators.functions.StringReplaceWithFlagsDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringPositionDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRTrim2Descriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRTrimDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpContainsDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpContainsWithFlagDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpLikeDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpLikeWithFlagDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpPositionDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpPositionWithFlagDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpReplaceDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringRegExpReplaceWithFlagsDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringStartsWithDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringToCodePointDescriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringTrim2Descriptor;
+import org.apache.asterix.runtime.evaluators.functions.StringTrimDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.StringUpperCaseDescriptor;
 import org.apache.asterix.runtime.evaluators.functions.Substring2Descriptor;
 import org.apache.asterix.runtime.evaluators.functions.SubstringAfterDescriptor;
@@ -476,12 +487,8 @@ public class FunctionCollection {
         functionsToInjectUnkownHandling.add(StringStartsWithDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(SubstringDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(StringEqualDescriptor.FACTORY);
-        functionsToInjectUnkownHandling.add(StringMatchesDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(StringLowerCaseDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(StringUpperCaseDescriptor.FACTORY);
-        functionsToInjectUnkownHandling.add(StringMatchesWithFlagDescriptor.FACTORY);
-        functionsToInjectUnkownHandling.add(StringReplaceDescriptor.FACTORY);
-        functionsToInjectUnkownHandling.add(StringReplaceWithFlagsDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(StringLengthDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(Substring2Descriptor.FACTORY);
         functionsToInjectUnkownHandling.add(SubstringBeforeDescriptor.FACTORY);
@@ -490,7 +497,22 @@ public class FunctionCollection {
         functionsToInjectUnkownHandling.add(CodePointToStringDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(StringConcatDescriptor.FACTORY);
         functionsToInjectUnkownHandling.add(StringJoinDescriptor.FACTORY);
-        functionsToInjectUnkownHandling.add(RegExpDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpContainsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpContainsWithFlagDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpLikeDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpLikeWithFlagDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpPositionDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpPositionWithFlagDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpReplaceDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRegExpReplaceWithFlagsDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringInitCapDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringTrimDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringLTrimDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRTrimDescriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringTrim2Descriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringLTrim2Descriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringRTrim2Descriptor.FACTORY);
+        functionsToInjectUnkownHandling.add(StringPositionDescriptor.FACTORY);
 
         // Constructors
         functionsToInjectUnkownHandling.add(ABooleanConstructorDescriptor.FACTORY);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
index 90ee93f..00a84fc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
@@ -26,24 +26,24 @@ sum(
   where $p.p_partkey = $l.l_partkey
     and ( (
         $p.p_brand = 'Brand#12'
-        and reg-exp($p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG')
+        and matches($p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG')
         and $l.l_quantity >= 1 and $l.l_quantity <= 11
         and $p.p_size >= 1 and $p.p_size <= 5
-        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and matches($l.l_shipmode, 'AIR||AIR REG')
         and $l.l_shipinstruct = 'DELIVER IN PERSON'
       ) or (
         $p.p_brand = 'Brand#23'
-        and reg-exp($p.p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
+        and matches($p.p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
         and $l.l_quantity >= 10 and $l.l_quantity <= 20
         and $p.p_size >= 1 and $p.p_size <= 10
-        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and matches($l.l_shipmode, 'AIR||AIR REG')
         and $l.l_shipinstruct = 'DELIVER IN PERSON'
       ) or (
         $p.p_brand = 'Brand#34'
-        and reg-exp($p.p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
+        and matches($p.p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
         and $l.l_quantity >= 20 and $l.l_quantity <= 30
         and $p.p_size >= 1 and $p.p_size <= 15
-        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and matches($l.l_shipmode, 'AIR||AIR REG')
         and $l.l_shipinstruct = 'DELIVER IN PERSON'
       )
     )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
index 42e9a82..60d3c41 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
@@ -20,30 +20,30 @@ use dataverse tpch;
 
 set import-private-functions 'true';
 
-sum( 
+sum(
   for $l in dataset('LineItem')
   for $p in dataset('Part')
   where $p.p_partkey = $l.l_partkey
     and ( (
         $p.p_brand = 'Brand#12'
-        and reg-exp($p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG')
+        and matches($p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG')
         and $l.l_quantity >= 1 and $l.l_quantity <= 11
         and $p.p_size >= 1 and $p.p_size <= 5
-        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and matches($l.l_shipmode, 'AIR||AIR REG')
         and $l.l_shipinstruct = 'DELIVER IN PERSON'
       ) or (
         $p.p_brand = 'Brand#23'
-        and reg-exp($p.p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
+        and matches($p.p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
         and $l.l_quantity >= 10 and $l.l_quantity <= 20
         and $p.p_size >= 1 and $p.p_size <= 10
-        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and matches($l.l_shipmode, 'AIR||AIR REG')
         and $l.l_shipinstruct = 'DELIVER IN PERSON'
       ) or (
         $p.p_brand = 'Brand#34'
-        and reg-exp($p.p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
+        and matches($p.p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
         and $l.l_quantity >= 20 and $l.l_quantity <= 30
         and $p.p_size >= 1 and $p.p_size <= 15
-        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and matches($l.l_shipmode, 'AIR||AIR REG')
         and $l.l_shipinstruct = 'DELIVER IN PERSON'
       )
     )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/greatest_mixed/greatest_mixed.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/greatest_mixed/greatest_mixed.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/greatest_mixed/greatest_mixed.3.query.sqlpp
new file mode 100644
index 0000000..9056b4b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/greatest_mixed/greatest_mixed.3.query.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+SELECT VALUE greatest(1.0, 3.0, -2, 10.0, 2, null, missing);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/least_mixed/least_mixed.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/least_mixed/least_mixed.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/least_mixed/least_mixed.1.query.sqlpp
new file mode 100644
index 0000000..948d146
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/comparison/least_mixed/least_mixed.1.query.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+SELECT VALUE LEAST(1.0, 3.0, -2, 10.0, 2, null, missing);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_func/concat_func.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_func/concat_func.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_func/concat_func.1.query.sqlpp
new file mode 100644
index 0000000..46f2a65
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_func/concat_func.1.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+with  k as [{'a':1,'b':'hello'},{'a':2,'b':{'k':[1,2,2]}}]
+
+select value concat(x.b, " world")
+from  k as x
+where x.a = 1
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe/concat_pipe.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe/concat_pipe.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe/concat_pipe.1.query.sqlpp
new file mode 100644
index 0000000..16bef11
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe/concat_pipe.1.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+with  k as [{'a':1,'b':'hello'},{'a':2,'b':{'k':[1,2,2]}}]
+
+select value x.b || " world"
+from  k as x
+where x.a = 1
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe_multi/concat_pipe_multi.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe_multi/concat_pipe_multi.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe_multi/concat_pipe_multi.1.query.sqlpp
new file mode 100644
index 0000000..3f06395
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/concat_pipe_multi/concat_pipe_multi.1.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+with  k as [{'a':1,'b':'hello'},{'a':2,'b':{'k':[1,2,2]}}]
+
+select value x.b || " new" || " world"
+from  k as x
+where x.a = 1
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/initcap/initcap.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/initcap/initcap.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/initcap/initcap.1.query.sqlpp
new file mode 100644
index 0000000..35580ce
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/initcap/initcap.1.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+[
+   initcap(""),
+   initcap("very large data base--a conference"),
+   initcap("very large data base?a conference"),
+   initcap(null),
+   initcap(missing)
+];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/ltrim/ltrim.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/ltrim/ltrim.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/ltrim/ltrim.1.query.sqlpp
new file mode 100644
index 0000000..bc062e5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/ltrim/ltrim.1.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+[
+   ltrim(""),
+   ltrim("    "),
+   ltrim(" abc "),
+   ltrim("abcd"),
+   ltrim(null),
+   ltrim(missing),
+   ltrim("", "ad "),
+   ltrim("    ", "ad "),
+   ltrim(" abc ", "ad "),
+   ltrim("abcd", "ad "),
+   ltrim("abc", null),
+   ltrim(null, "abc"),
+   ltrim(null, null),
+   ltrim("abc", missing),
+   ltrim(missing, "abc"),
+   ltrim(missing, missing)
+];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/position/position.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/position/position.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/position/position.1.query.sqlpp
new file mode 100644
index 0000000..d8afe59
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/position/position.1.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+select element [position(x,'ofo'), position(y,'ofo')]
+from  ['foofoo'] as x,
+      ['barbar'] as y
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains/regexp_contains.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains/regexp_contains.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains/regexp_contains.1.query.sqlpp
new file mode 100644
index 0000000..a639365
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains/regexp_contains.1.query.sqlpp
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+select element a
+from [
+      REGEXP_CONTAINS('mnop','.'),
+      REGEXP_CONTAINS('abcdefABCDEF','/d'),
+      REGEXP_CONTAINS('12345','\\d'),
+      REGEXP_CONTAINS('abcdefGHIJK','\\D'),
+      REGEXP_CONTAINS('       ','\\s'),
+      REGEXP_CONTAINS('       ','\\S'),
+      REGEXP_CONTAINS('Welcome to pattern matching!','[a-zA-Z_0-9]'),
+      REGEXP_CONTAINS('!@#$%^&*()','[a-zA-Z_0-9]'),
+      REGEXP_CONTAINS('!@#$%^&*()','[^\\W]'),
+      REGEXP_CONTAINS('!@#$%^&*','[^\\w]'),
+      REGEXP_CONTAINS('0xffff','[\\p{XDigit}]'),
+      REGEXP_CONTAINS('FFFFFFFF','[\\p{XDigit}]'),
+      REGEXP_CONTAINS('abcdefgh','[\\p{javaLowerCase}]'),
+      REGEXP_CONTAINS('ABCDEF','[\\p{javaLowerCase}]'),
+      REGEXP_CONTAINS(`codepoint-to-string`([163]),'[\\p{Sc}]')
+     ] as a
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains_with_flag/regexp_contains.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains_with_flag/regexp_contains.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains_with_flag/regexp_contains.1.query.sqlpp
new file mode 100644
index 0000000..0836054
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_contains_with_flag/regexp_contains.1.query.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+{'result1': REGEXP_CONTAINS('helloworld','hello world','x')};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like/regexp_like.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like/regexp_like.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like/regexp_like.1.query.sqlpp
new file mode 100644
index 0000000..eaaacc5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like/regexp_like.1.query.sqlpp
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+select element a
+from [
+      REGEXP_LIKE('mnop','.'),
+      REGEXP_LIKE('abcdefABCDEF','/d'),
+      REGEXP_LIKE('12345','\\d'),
+      REGEXP_LIKE('abcdefGHIJK','\\D'),
+      REGEXP_LIKE('       ','\\s'),
+      REGEXP_LIKE('       ','\\S'),
+      REGEXP_LIKE('Welcome to pattern matching!','[a-zA-Z_0-9]'),
+      REGEXP_LIKE('!@#$%^&*()','[a-zA-Z_0-9]'),
+      REGEXP_LIKE('!@#$%^&*()','[^\\W]'),
+      REGEXP_LIKE('!@#$%^&*','[^\\w]'),
+      REGEXP_LIKE('0xffff','[\\p{XDigit}]'),
+      REGEXP_LIKE('FFFFFFFF','[\\p{XDigit}]'),
+      REGEXP_LIKE('abcdefgh','[\\p{javaLowerCase}]'),
+      REGEXP_LIKE('ABCDEF','[\\p{javaLowerCase}]'),
+      REGEXP_LIKE(`codepoint-to-string`([163]),'[\\p{Sc}]'),
+      REGEXP_LIKE('Steven','Ste(v|ph)en'),
+      REGEXP_LIKE('Stephen','.*(v|ph)*')
+     ] as a
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like_with_flag/regexp_like_with_flag.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like_with_flag/regexp_like_with_flag.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like_with_flag/regexp_like_with_flag.1.query.sqlpp
new file mode 100644
index 0000000..91f90a4
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_like_with_flag/regexp_like_with_flag.1.query.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+{'result1': REGEXP_LIKE('helloworld','hello world','x')};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position/regexp_position.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position/regexp_position.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position/regexp_position.1.query.sqlpp
new file mode 100644
index 0000000..41b4489
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position/regexp_position.1.query.sqlpp
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+select element a
+from [
+      REGEXP_POSITION('mnop','.'),
+      REGEXP_POSITION('abcdefABCDEF','/d'),
+      REGEXP_POSITION('12345','\\d'),
+      REGEXP_POSITION('abcdefGHIJK','\\D'),
+      REGEXP_POSITION('       ','\\s'),
+      REGEXP_POSITION('       ','\\S'),
+      REGEXP_POSITION('Welcome to pattern matching!','[a-zA-Z_0-9]'),
+      REGEXP_POSITION('!@#$%^&*()','[a-zA-Z_0-9]'),
+      REGEXP_POSITION('!@#$%^&*()','[^\\W]'),
+      REGEXP_POSITION('!@#$%^&*','[^\\w]'),
+      REGEXP_POSITION('0xffff','[\\p{XDigit}]'),
+      REGEXP_POSITION('FFFFFFFF','[\\p{XDigit}]'),
+      REGEXP_POSITION('abcdefgh','[\\p{javaLowerCase}]'),
+      REGEXP_POSITION('ABCDEF','[\\p{javaLowerCase}]'),
+      REGEXP_POSITION(`codepoint-to-string`([163]),'[\\p{Sc}]')
+     ] as a
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position_with_flag/regexp_position_with_flag.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position_with_flag/regexp_position_with_flag.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position_with_flag/regexp_position_with_flag.1.query.sqlpp
new file mode 100644
index 0000000..6568d06
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_position_with_flag/regexp_position_with_flag.1.query.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+{'result1': REGEXP_POSITION('helloworld','hello world','x')};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_replace/regexp_replace.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_replace/regexp_replace.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_replace/regexp_replace.1.query.sqlpp
new file mode 100644
index 0000000..819bb83
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/regexp_replace/regexp_replace.1.query.sqlpp
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+
+{
+  'result1':REGEXP_REPLACE('abracadabra','',null,null),
+  'result2':REGEXP_REPLACE('abracadabra','bra','XXX',''),
+  'result3':REGEXP_REPLACE(null,'hello world','XxXx','x'),
+  'result4':REGEXP_REPLACE('abracadabra','bra','XXX',null),
+  'result5':REGEXP_REPLACE('abracadabra',null,'XXX',null),
+  'result6':REGEXP_REPLACE('abracadabra','Bra',null,'i'),
+  'result7':REGEXP_REPLACE('abracadabra','Bra','','i'),
+  'result8':REGEXP_REPLACE('abracadabra','','XXX','')
+};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/rtrim/rtrim.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/rtrim/rtrim.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/rtrim/rtrim.1.query.sqlpp
new file mode 100644
index 0000000..64a050b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/rtrim/rtrim.1.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+[
+   rtrim(""),
+   rtrim("    "),
+   rtrim(" abc "),
+   rtrim("abcd"),
+   rtrim(null),
+   rtrim(missing),
+   rtrim("", "ad "),
+   rtrim("    ", "ad "),
+   rtrim(" abc ", "ad "),
+   rtrim("abcd", "ad "),
+   rtrim("abc", null),
+   rtrim(null, "abc"),
+   rtrim(null, null),
+   rtrim("abc", missing),
+   rtrim(missing, "abc"),
+   rtrim(missing, missing)
+];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/title/title.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/title/title.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/title/title.1.query.sqlpp
new file mode 100644
index 0000000..b12c475
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/title/title.1.query.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+[
+   title(""),
+   title("very large data base--a conference"),
+   title("very large data base?a conference"),
+   title(null),
+   title(missing)
+];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/trim/trim.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/trim/trim.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/trim/trim.1.query.sqlpp
new file mode 100644
index 0000000..61dc619
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/string/trim/trim.1.query.sqlpp
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+[
+   trim(""),
+   trim("    "),
+   trim(" abc "),
+   trim("abcd"),
+   trim(null),
+   trim(missing),
+   trim("", "ad "),
+   trim("    ", "ad "),
+   trim(" abc ", "ad "),
+   trim("abcd", "ad "),
+   trim("abc", null),
+   trim(null, "abc"),
+   trim(null, null),
+   trim("abc", missing),
+   trim(missing, "abc"),
+   trim(missing, missing)
+];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
index 21086cb..9057ccb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
@@ -22,9 +22,9 @@ use tpch;
 
 set `import-private-functions` `true`;
 
-select element tpch.coll_sum((
+select element coll_sum((
     select element (l.l_extendedprice * (1 - l.l_discount))
     from  LineItem as l,
           Part as p
-    where ((p.p_partkey = l.l_partkey) and (((p.p_brand = 'Brand#12') and tpch.`reg-exp`(p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG') and (l.l_quantity >= 1) and (l.l_quantity <= 11) and (p.p_size >= 1) and (p.p_size <= 5) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#23') and tpch.`reg-exp`(p.p_container,'MED BAG||MED BOX||MED PKG||MED PACK') and (l.l_quantity >= 10) and (l.l_quantity <= 20) and (p.p_size >= 1) and (p.p_size <= 10) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#34') and tpch.`reg-exp`(p.p_container,'LG CASE||LG BOX||LG PACK||LG PKG') and (l.l_quantity >= 20) and (l.l_quantity <= 30) and (p.p_size >= 1) and (p.p_size <= 15) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON'))))
+    where ((p.p_partkey = l.l_partkey) and (((p.p_brand = 'Brand#12') and regexp_contains(p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG') and (l.l_quantity >= 1) and (l.l_quantity <= 11) and (p.p_size >= 1) and (p.p_size <= 5) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#23') and regexp_contains(p.p_container,'MED BAG||MED BOX||MED PKG||MED PACK') and (l.l_quantity >= 10) and (l.l_quantity <= 20) and (p.p_size >= 1) and (p.p_size <= 10) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#34') and regexp_contains(p.p_container,'LG CASE||LG BOX||LG PACK||LG PKG') and (l.l_quantity >= 20) and (l.l_quantity <= 30) and (p.p_size >= 1) and (p.p_size <= 15) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON'))))
 ));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
index cb352ea..318e939 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-sugar/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
@@ -28,28 +28,28 @@ ON p_partkey = l_partkey
   WHERE
   (
     p_brand = 'Brand#12'
-    AND `reg-exp`(p_container, 'SM CASE||SM BOX||SM PACK||SM PKG')
+    AND regexp_contains(p_container, 'SM CASE||SM BOX||SM PACK||SM PKG')
     AND l_quantity >= 1 and l_quantity <= 11
     AND p_size >= 1 and p_size <= 5
-    AND `reg-exp`(l_shipmode, 'AIR||AIR REG')
+    AND regexp_contains(l_shipmode, 'AIR||AIR REG')
     AND l_shipinstruct = 'DELIVER IN PERSON'
   )
   OR
   (
     p_brand = 'Brand#23'
-    AND `reg-exp`(p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
+    AND regexp_contains(p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
     AND l_quantity >= 10 and l_quantity <= 20
     AND p_size >= 1 and p_size <= 10
-    AND `reg-exp`(l_shipmode, 'AIR||AIR REG')
+    AND regexp_contains(l_shipmode, 'AIR||AIR REG')
     AND l_shipinstruct = 'DELIVER IN PERSON'
   )
   OR
   (
     p_brand = 'Brand#34'
-    AND `reg-exp`(p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
+    AND regexp_contains(p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
     AND l_quantity >= 20 and l_quantity <= 30
     AND p_size >= 1 and p_size <= 15
-    AND `reg-exp`(l_shipmode, 'AIR||AIR REG')
+    AND regexp_contains(l_shipmode, 'AIR||AIR REG')
     AND l_shipinstruct = 'DELIVER IN PERSON'
   )
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
index 73b8daf..4b4da55 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
@@ -28,28 +28,28 @@ ON p.p_partkey = l.l_partkey
   WHERE
   (
     p.p_brand = 'Brand#12'
-    AND `reg-exp`(p.p_container, 'SM CASE||SM BOX||SM PACK||SM PKG')
+    AND regexp_contains(p.p_container, 'SM CASE||SM BOX||SM PACK||SM PKG')
     AND l.l_quantity >= 1 and l.l_quantity <= 11
     AND p.p_size >= 1 and p.p_size <= 5
-    AND `reg-exp`(l.l_shipmode, 'AIR||AIR REG')
+    AND regexp_contains(l.l_shipmode, 'AIR||AIR REG')
     AND l.l_shipinstruct = 'DELIVER IN PERSON'
   )
   OR
   (
     p.p_brand = 'Brand#23'
-    AND `reg-exp`(p.p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
+    AND regexp_contains(p.p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
     AND l.l_quantity >= 10 and l.l_quantity <= 20
     AND p.p_size >= 1 and p.p_size <= 10
-    AND `reg-exp`(l.l_shipmode, 'AIR||AIR REG')
+    AND regexp_contains(l.l_shipmode, 'AIR||AIR REG')
     AND l.l_shipinstruct = 'DELIVER IN PERSON'
   )
   OR
   (
     p.p_brand = 'Brand#34'
-    AND `reg-exp`(p.p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
+    AND regexp_contains(p.p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
     AND l.l_quantity >= 20 and l.l_quantity <= 30
     AND p.p_size >= 1 and p.p_size <= 15
-    AND `reg-exp`(l.l_shipmode, 'AIR||AIR REG')
+    AND regexp_contains(l.l_shipmode, 'AIR||AIR REG')
     AND l.l_shipinstruct = 'DELIVER IN PERSON'
   )
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
index 21086cb..9057ccb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
@@ -22,9 +22,9 @@ use tpch;
 
 set `import-private-functions` `true`;
 
-select element tpch.coll_sum((
+select element coll_sum((
     select element (l.l_extendedprice * (1 - l.l_discount))
     from  LineItem as l,
           Part as p
-    where ((p.p_partkey = l.l_partkey) and (((p.p_brand = 'Brand#12') and tpch.`reg-exp`(p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG') and (l.l_quantity >= 1) and (l.l_quantity <= 11) and (p.p_size >= 1) and (p.p_size <= 5) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#23') and tpch.`reg-exp`(p.p_container,'MED BAG||MED BOX||MED PKG||MED PACK') and (l.l_quantity >= 10) and (l.l_quantity <= 20) and (p.p_size >= 1) and (p.p_size <= 10) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#34') and tpch.`reg-exp`(p.p_container,'LG CASE||LG BOX||LG PACK||LG PKG') and (l.l_quantity >= 20) and (l.l_quantity <= 30) and (p.p_size >= 1) and (p.p_size <= 15) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON'))))
+    where ((p.p_partkey = l.l_partkey) and (((p.p_brand = 'Brand#12') and regexp_contains(p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG') and (l.l_quantity >= 1) and (l.l_quantity <= 11) and (p.p_size >= 1) and (p.p_size <= 5) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#23') and regexp_contains(p.p_container,'MED BAG||MED BOX||MED PKG||MED PACK') and (l.l_quantity >= 10) and (l.l_quantity <= 20) and (p.p_size >= 1) and (p.p_size <= 10) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#34') and regexp_contains(p.p_container,'LG CASE||LG BOX||LG PACK||LG PKG') and (l.l_quantity >= 20) and (l.l_quantity <= 30) and (p.p_size >= 1) and (p.p_size <= 15) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON'))))
 ));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
index d2ca05c..df4e276 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.query.sqlpp
@@ -26,5 +26,5 @@ select element COLL_SUM((
     select element (l.l_extendedprice * (1 - l.l_discount))
     from  LineItem as l,
           Part as p
-    where ((p.p_partkey = l.l_partkey) and (((p.p_brand = 'Brand#12') and tpch.`reg-exp`(p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG') and (l.l_quantity >= 1) and (l.l_quantity <= 11) and (p.p_size >= 1) and (p.p_size <= 5) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#23') and tpch.`reg-exp`(p.p_container,'MED BAG||MED BOX||MED PKG||MED PACK') and (l.l_quantity >= 10) and (l.l_quantity <= 20) and (p.p_size >= 1) and (p.p_size <= 10) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#34') and tpch.`reg-exp`(p.p_container,'LG CASE||LG BOX||LG PACK||LG PKG') and (l.l_quantity >= 20) and (l.l_quantity <= 30) and (p.p_size >= 1) and (p.p_size <= 15) and tpch.`reg-exp`(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON'))))
+    where ((p.p_partkey = l.l_partkey) and (((p.p_brand = 'Brand#12') and regexp_contains(p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG') and (l.l_quantity >= 1) and (l.l_quantity <= 11) and (p.p_size >= 1) and (p.p_size <= 5) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#23') and regexp_contains(p.p_container,'MED BAG||MED BOX||MED PKG||MED PACK') and (l.l_quantity >= 10) and (l.l_quantity <= 20) and (p.p_size >= 1) and (p.p_size <= 10) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON')) or ((p.p_brand = 'Brand#34') and regexp_contains(p.p_container,'LG CASE||LG BOX||LG PACK||LG PKG') and (l.l_quantity >= 20) and (l.l_quantity <= 30) and (p.p_size >= 1) and (p.p_size <= 15) and regexp_contains(l.l_shipmode,'AIR||AIR REG') and (l.l_shipinstruct = 'DELIVER IN PERSON'))))
 ));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/greatest_mixed/greatest_mixed.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/greatest_mixed/greatest_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/greatest_mixed/greatest_mixed.1.adm
new file mode 100644
index 0000000..2f52450
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/greatest_mixed/greatest_mixed.1.adm
@@ -0,0 +1 @@
+10.0

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/least_mixed/least_mixed.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/least_mixed/least_mixed.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/least_mixed/least_mixed.1.adm
new file mode 100644
index 0000000..134d589
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/comparison/least_mixed/least_mixed.1.adm
@@ -0,0 +1 @@
+-2.0

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/concat_pipe_multi/concat_pipe_multi.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/concat_pipe_multi/concat_pipe_multi.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/concat_pipe_multi/concat_pipe_multi.1.adm
new file mode 100644
index 0000000..90ca27a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/concat_pipe_multi/concat_pipe_multi.1.adm
@@ -0,0 +1 @@
+"hello new world"

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/initcap/initcap.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/initcap/initcap.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/initcap/initcap.1.adm
new file mode 100644
index 0000000..5f6a8de
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/initcap/initcap.1.adm
@@ -0,0 +1 @@
+[ "", "Very Large Data Base--A Conference", "Very Large Data Base?A Conference", null, null ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/ltrim/ltrim.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/ltrim/ltrim.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/ltrim/ltrim.1.adm
new file mode 100644
index 0000000..d336557
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/ltrim/ltrim.1.adm
@@ -0,0 +1 @@
+[ "", "", "abc ", "abcd", null, null, "", "", "bc ", "bcd", null, null, null, null, null, null ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/position/position.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/position/position.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/position/position.1.adm
new file mode 100644
index 0000000..76e3e97
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/position/position.1.adm
@@ -0,0 +1 @@
+[ 2, -1 ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_like/regexp_like.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_like/regexp_like.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_like/regexp_like.1.adm
new file mode 100644
index 0000000..1d8287b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_like/regexp_like.1.adm
@@ -0,0 +1,17 @@
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+false
+true
+true
+true

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position/regexp_position.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position/regexp_position.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position/regexp_position.1.adm
new file mode 100644
index 0000000..428917f
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position/regexp_position.1.adm
@@ -0,0 +1,15 @@
+0
+-1
+0
+0
+0
+-1
+0
+-1
+-1
+0
+0
+0
+0
+-1
+0

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position_with_flag/regexp_position_with_flag.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position_with_flag/regexp_position_with_flag.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position_with_flag/regexp_position_with_flag.1.adm
new file mode 100644
index 0000000..fa99af7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/regexp_position_with_flag/regexp_position_with_flag.1.adm
@@ -0,0 +1 @@
+{ "result1": 0 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/rtrim/rtrim.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/rtrim/rtrim.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/rtrim/rtrim.1.adm
new file mode 100644
index 0000000..bcaee0b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/rtrim/rtrim.1.adm
@@ -0,0 +1 @@
+[ "", "", " abc", "abcd", null, null, "", "", " abc", "abc", null, null, null, null, null, null ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results/string/trim/trim.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/string/trim/trim.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/trim/trim.1.adm
new file mode 100644
index 0000000..410cb00
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/string/trim/trim.1.adm
@@ -0,0 +1 @@
+[ "", "", "abc", "abcd", null, null, "", "", "bc", "bc", null, null, null, null, null, null ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.ast
index 156754d..cc6a71b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.ast
@@ -56,7 +56,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [STRING] [Brand#12]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$p ]
                 Field=p_container
@@ -100,7 +100,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [LONG] [5]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$l ]
                 Field=l_shipmode
@@ -128,7 +128,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [STRING] [Brand#23]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$p ]
                 Field=p_container
@@ -172,7 +172,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [LONG] [10]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$l ]
                 Field=l_shipmode
@@ -200,7 +200,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [STRING] [Brand#34]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$p ]
                 Field=p_container
@@ -244,7 +244,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [LONG] [15]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$l ]
                 Field=l_shipmode

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.ast
index 156754d..cc6a71b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q19_discounted_revenue/q19_discounted_revenue.3.ast
@@ -56,7 +56,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [STRING] [Brand#12]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$p ]
                 Field=p_container
@@ -100,7 +100,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [LONG] [5]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$l ]
                 Field=l_shipmode
@@ -128,7 +128,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [STRING] [Brand#23]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$p ]
                 Field=p_container
@@ -172,7 +172,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [LONG] [10]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$l ]
                 Field=l_shipmode
@@ -200,7 +200,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [STRING] [Brand#34]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$p ]
                 Field=p_container
@@ -244,7 +244,7 @@ FunctionCall tpch.sum@1[
               LiteralExpr [LONG] [15]
             ]
             and
-            FunctionCall tpch.reg-exp@2[
+            FunctionCall tpch.matches@2[
               FieldAccessor [
                 Variable [ Name=$l ]
                 Field=l_shipmode

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/fdc71eb7/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 77b4a9c..5aa466c 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -1146,6 +1146,16 @@
         <output-dir compare="Text">binary_null</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="comparison">
+      <compilation-unit name="greatest_mixed">
+        <output-dir compare="Text">greatest_mixed</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="comparison">
+      <compilation-unit name="least_mixed">
+        <output-dir compare="Text">least_mixed</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="constructor">
     <test-case FilePath="constructor">
@@ -5073,6 +5083,21 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="string">
+      <compilation-unit name="concat_pipe">
+        <output-dir compare="Text">concat_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="concat_pipe_multi">
+        <output-dir compare="Text">concat_pipe_multi</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="concat_func">
+        <output-dir compare="Text">concat_03</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
       <compilation-unit name="constructor">
         <output-dir compare="Text">constructor</output-dir>
       </compilation-unit>
@@ -5148,6 +5173,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="string">
+      <compilation-unit name="initcap">
+        <output-dir compare="Text">initcap</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
       <compilation-unit name="length_01">
         <output-dir compare="Text">length_01</output-dir>
       </compilation-unit>
@@ -5173,6 +5203,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="string">
+      <compilation-unit name="ltrim">
+        <output-dir compare="Text">ltrim</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
       <compilation-unit name="matches02">
         <output-dir compare="Text">matches02</output-dir>
       </compilation-unit>
@@ -5238,6 +5273,46 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="string">
+      <compilation-unit name="position">
+        <output-dir compare="Text">position</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="regexp_contains">
+        <output-dir compare="Text">matches06</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="regexp_contains_with_flag">
+        <output-dir compare="Text">matches23</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="regexp_like">
+        <output-dir compare="Text">regexp_like</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="regexp_like_with_flag">
+        <output-dir compare="Text">matches23</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="regexp_position">
+        <output-dir compare="Text">regexp_position</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="regexp_position_with_flag">
+        <output-dir compare="Text">regexp_position_with_flag</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
+      <compilation-unit name="regexp_replace">
+        <output-dir compare="Text">replace22</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
       <compilation-unit name="replace1">
         <output-dir compare="Text">replace1</output-dir>
       </compilation-unit>
@@ -5263,6 +5338,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="string">
+      <compilation-unit name="rtrim">
+        <output-dir compare="Text">rtrim</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
       <compilation-unit name="start-with1">
         <output-dir compare="Text">start-with1</output-dir>
       </compilation-unit>
@@ -5465,6 +5545,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="string">
+      <compilation-unit name="title">
+        <output-dir compare="Text">initcap</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
       <compilation-unit name="toLowerCase02">
         <output-dir compare="Text">toLowerCase02</output-dir>
       </compilation-unit>
@@ -5480,6 +5565,11 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="string">
+      <compilation-unit name="trim">
+        <output-dir compare="Text">trim</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="string">
       <compilation-unit name="uppercase">
         <output-dir compare="Text">uppercase</output-dir>
       </compilation-unit>


Mime
View raw message