http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/sqlpp/builtins.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/sqlpp/builtins.html 
b/content/docs/0.9.4/sqlpp/builtins.html
new file mode 100644
index 0000000..2ace95a
--- /dev/null
+++ b/content/docs/0.9.4/sqlpp/builtins.html
@@ -0,0 +1,8927 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from 
target/generated-site/markdown/sqlpp/builtins.md at 2018-10-12
+ | Rendered using Apache Maven Fluido Skin 1.7
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20181012" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Builtin Functions</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
+    <link rel="stylesheet" href="../css/site.css" />
+    <link rel="stylesheet" href="../css/print.css" media="print" />
+    <script type="text/javascript" 
src="../js/apache-maven-fluido-1.7.min.js"></script>
+
+  </head>
+  <body class="topBarDisabled">
+    <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><a href=".././" id="bannerLeft"><img 
src="../images/asterixlogo.png"  alt="AsterixDB"/></a></div>
+        <div class="pull-right"></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+        <li id="publishDate">Last Published: 2018-10-12</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+      <li class="pull-right"><a href="../index.html" title="Documentation 
Home">Documentation Home</a></li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+    <ul class="nav nav-list">
+      <li class="nav-header">Get Started - Installation</li>
+    <li><a href="../ncservice.html" title="Option 1: using NCService"><span 
class="none"></span>Option 1: using NCService</a></li>
+    <li><a href="../ansible.html" title="Option 2: using Ansible"><span 
class="none"></span>Option 2: using Ansible</a></li>
+    <li><a href="../aws.html" title="Option 3: using Amazon Web 
Services"><span class="none"></span>Option 3: using Amazon Web Services</a></li>
+      <li class="nav-header">AsterixDB Primer</li>
+    <li><a href="../sqlpp/primer-sqlpp.html" title="Using SQL++"><span 
class="none"></span>Using SQL++</a></li>
+      <li class="nav-header">Data Model</li>
+    <li><a href="../datamodel.html" title="The Asterix Data Model"><span 
class="none"></span>The Asterix Data Model</a></li>
+      <li class="nav-header">Queries</li>
+    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span 
class="none"></span>The SQL++ Query Language</a></li>
+    <li class="active"><a href="#"><span class="none"></span>Builtin 
Functions</a></li>
+      <li class="nav-header">API/SDK</li>
+    <li><a href="../api.html" title="HTTP API"><span class="none"></span>HTTP 
API</a></li>
+    <li><a href="../csv.html" title="CSV Output"><span class="none"></span>CSV 
Output</a></li>
+      <li class="nav-header">Advanced Features</li>
+    <li><a href="../aql/externaldata.html" title="Accessing External 
Data"><span class="none"></span>Accessing External Data</a></li>
+    <li><a href="../feeds.html" title="Data Ingestion with Feeds"><span 
class="none"></span>Data Ingestion with Feeds</a></li>
+    <li><a href="../udf.html" title="User Defined Functions"><span 
class="none"></span>User Defined Functions</a></li>
+    <li><a href="../sqlpp/filters.html" title="Filter-Based LSM Index 
Acceleration"><span class="none"></span>Filter-Based LSM Index 
Acceleration</a></li>
+    <li><a href="../sqlpp/fulltext.html" title="Support of Full-text 
Queries"><span class="none"></span>Support of Full-text Queries</a></li>
+    <li><a href="../sqlpp/similarity.html" title="Support of Similarity 
Queries"><span class="none"></span>Support of Similarity Queries</a></li>
+      <li class="nav-header">Deprecated</li>
+    <li><a href="../aql/primer.html" title="AsterixDB Primer: Using AQL"><span 
class="none"></span>AsterixDB Primer: Using AQL</a></li>
+    <li><a href="../aql/manual.html" title="Queries: The Asterix Query 
Language (AQL)"><span class="none"></span>Queries: The Asterix Query Language 
(AQL)</a></li>
+    <li><a href="../aql/builtins.html" title="Queries: Builtin Functions 
(AQL)"><span class="none"></span>Queries: Builtin Functions (AQL)</a></li>
+</ul>
+          <hr />
+          <div id="poweredBy">
+            <div class="clear"></div>
+            <div class="clear"></div>
+            <div class="clear"></div>
+            <div class="clear"></div>
+<a href=".././" title="AsterixDB" class="builtBy"><img class="builtBy"  
alt="AsterixDB" src="../images/asterixlogo.png"    /></a>
+            </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+<!--
+ ! 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.
+ !-->
+<h1>Builtin Functions</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of 
Contents</a></h2>
+<ul>
+
+<li><a href="#NumericFunctions">Numeric Functions</a></li>
+<li><a href="#StringFunctions">String Functions</a></li>
+<li><a href="#BinaryFunctions">Binary Functions</a></li>
+<li><a href="#SpatialFunctions">Spatial Functions</a></li>
+<li><a href="#SimilarityFunctions">Similarity Functions</a></li>
+<li><a href="#TokenizingFunctions">Tokenizing Functions</a></li>
+<li><a href="#TemporalFunctions">Temporal Functions</a></li>
+<li><a href="#ObjectFunctions">Object Functions</a></li>
+<li><a href="#AggregateFunctions">Aggregate Functions (Array 
Functions)</a></li>
+<li><a href="#ComparisonFunctions">Comparison Functions</a></li>
+<li><a href="#TypeFunctions">Type Functions</a></li>
+<li><a href="#ConditionalFunctions">Conditional Functions</a></li>
+<li><a href="#MiscFunctions">Miscellaneous Functions</a></li>
+</ul>
+<p>The system provides various classes of functions to support operations on 
numeric, string, spatial, and temporal data. This document explains how to use 
these functions.</p><!--
+ ! 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.
+ !-->
+</div>
+<div class="section">
+<h2><a name="Numeric_Functions"></a><a name="NumericFunctions" 
id="NumericFunctions">Numeric Functions</a></h2>
+<div class="section">
+<h3><a name="abs"></a>abs</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">abs(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the absolute value of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>The absolute value of the argument with the same type as the input 
argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: abs(2013), &quot;v2&quot;: abs(-4036), 
&quot;v3&quot;: abs(0), &quot;v4&quot;: abs(float(&quot;-2013.5&quot;)), 
&quot;v5&quot;: abs(double(&quot;-2013.593823748327284&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 2013, &quot;v2&quot;: 4036, 
&quot;v3&quot;: 0, &quot;v4&quot;: 2013.5, &quot;v5&quot;: 2013.5938237483274 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="acos"></a>acos</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">acos(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the arc cosine value of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> arc cosine in radians for the argument, if the 
argument is in the range of -1 (inclusive) to 1 (inclusive),</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error,</li>
+<li>&#x201c;NaN&#x201d; for other legitimate numeric values.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: acos(1), &quot;v2&quot;: acos(2), 
&quot;v3&quot;: acos(0), &quot;v4&quot;: acos(float(&quot;0.5&quot;)), 
&quot;v5&quot;: acos(double(&quot;-0.5&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 0.0, &quot;v2&quot;: &quot;NaN&quot;, 
&quot;v3&quot;: 1.5707963267948966, &quot;v4&quot;: 1.0471975511965979, 
&quot;v5&quot;: 2.0943951023931957 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="asin"></a>asin</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">asin(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the arc sine value of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> arc sin in radians for the argument, if the argument 
is in the range of -1 (inclusive) to 1 (inclusive),</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error,</li>
+<li>&#x201c;NaN&#x201d; for other legitimate numeric values.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: asin(1), &quot;v2&quot;: asin(2), 
&quot;v3&quot;: asin(0), &quot;v4&quot;: asin(float(&quot;0.5&quot;)), 
&quot;v5&quot;: asin(double(&quot;-0.5&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 1.5707963267948966, &quot;v2&quot;: 
&quot;NaN&quot;, &quot;v3&quot;: 0.0, &quot;v4&quot;: 0.5235987755982989, 
&quot;v5&quot;: -0.5235987755982989 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="atan"></a>atan</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">atan(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the arc tangent value of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> arc tangent in radians for the argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: atan(1), &quot;v2&quot;: atan(2), 
&quot;v3&quot;: atan(0), &quot;v4&quot;: atan(float(&quot;0.5&quot;)), 
&quot;v5&quot;: atan(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 0.7853981633974483, &quot;v2&quot;: 
1.1071487177940904, &quot;v3&quot;: 0.0, &quot;v4&quot;: 0.4636476090008061, 
&quot;v5&quot;: 1.5697963271282298 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="atan2"></a>atan2</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">atan2(numeric_value1, numeric_value2)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the arc tangent value of numeric_value2/numeric_value1.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value1</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value,</li>
+<li><tt>numeric_value2</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> arc tangent in radians for <tt>numeric_value1</tt> and 
<tt>numeric_value2</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: atan2(1, 2), &quot;v2&quot;: atan2(0, 
4), &quot;v3&quot;: atan2(float(&quot;0.5&quot;), double(&quot;-0.5&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 0.4636476090008061, &quot;v2&quot;: 0.0, 
&quot;v3&quot;: 2.356194490192345 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="ceil"></a>ceil</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">ceil(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the smallest (closest to negative infinity) number with no 
fractional part that is not less than the value of the argument. If the 
argument is already equal to mathematical integer, then the result is the same 
as the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>The ceiling value for the given number in the same type as the input 
argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: ceil(2013),
+  &quot;v2&quot;: ceil(-4036),
+  &quot;v3&quot;: ceil(0.3),
+  &quot;v4&quot;: ceil(float(&quot;-2013.2&quot;)),
+  &quot;v5&quot;: ceil(double(&quot;-2013.893823748327284&quot;))
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, 
&quot;v3&quot;: 1.0, &quot;v4&quot;: -2013.0, &quot;v5&quot;: -2013.0 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="cos"></a>cos</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">cos(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the cosine value of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> cosine value for the argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: cos(1), &quot;v2&quot;: cos(2), 
&quot;v3&quot;: cos(0), &quot;v4&quot;: cos(float(&quot;0.5&quot;)), 
&quot;v5&quot;: cos(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 0.5403023058681398, &quot;v2&quot;: 
-0.4161468365471424, &quot;v3&quot;: 1.0, &quot;v4&quot;: 0.8775825618903728, 
&quot;v5&quot;: 0.562379076290703 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="exp"></a>exp</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">exp(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes e<sup>numeric_value</sup>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>e<sup>numeric_value</sup>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: exp(1), &quot;v2&quot;: exp(2), 
&quot;v3&quot;: exp(0), &quot;v4&quot;: exp(float(&quot;0.5&quot;)), 
&quot;v5&quot;: exp(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 2.718281828459045, &quot;v2&quot;: 
7.38905609893065, &quot;v3&quot;: 1.0, &quot;v4&quot;: 1.6487212707001282, 
&quot;v5&quot;: &quot;Infinity&quot; }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="floor"></a>floor</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">floor(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the largest (closest to positive infinity) number with no 
fractional part that is not greater than the value. If the argument is already 
equal to mathematical integer, then the result is the same as the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>The floor value for the given number in the same type as the input 
argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: floor(2013),
+  &quot;v2&quot;: floor(-4036),
+  &quot;v3&quot;: floor(0.8),
+  &quot;v4&quot;: floor(float(&quot;-2013.2&quot;)),
+  &quot;v5&quot;: floor(double(&quot;-2013.893823748327284&quot;))
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, 
&quot;v3&quot;: 0.0, &quot;v4&quot;: -2014.0, &quot;v5&quot;: -2014.0 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="ln"></a>ln</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">ln(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes log<sub>e</sub>numeric_value.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>log<sub>e</sub>numeric_value,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: ln(1), &quot;v2&quot;: ln(2), 
&quot;v3&quot;: ln(0), &quot;v4&quot;: ln(float(&quot;0.5&quot;)), 
&quot;v5&quot;: ln(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.6931471805599453, 
&quot;v3&quot;: &quot;-Infinity&quot;, &quot;v4&quot;: -0.6931471805599453, 
&quot;v5&quot;: 6.907755278982137 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="log"></a>log</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">log(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes log<sub>10</sub>numeric_value.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>log<sub>10</sub>numeric_value,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: log(1), &quot;v2&quot;: log(2), 
&quot;v3&quot;: log(0), &quot;v4&quot;: log(float(&quot;0.5&quot;)), 
&quot;v5&quot;: log(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.3010299956639812, 
&quot;v3&quot;: &quot;-Infinity&quot;, &quot;v4&quot;: -0.3010299956639812, 
&quot;v5&quot;: 3.0 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="power"></a>power</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">power(numeric_value1, numeric_value2)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes numeric_value1<sup>numeric_value2</sup>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value1</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value,</li>
+<li><tt>numeric_value2</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>numeric_value1<sup>numeric_value2</sup>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: power(1, 2), &quot;v3&quot;: power(0, 
4), &quot;v4&quot;: power(float(&quot;0.5&quot;), double(&quot;-0.5&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 1, &quot;v3&quot;: 0, &quot;v4&quot;: 
1.4142135623730951 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="round"></a>round</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">round(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the number with no fractional part that is closest (and also 
closest to positive infinity) to the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>The rounded value for the given number in the same type as the input 
argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: round(2013),
+  &quot;v2&quot;: round(-4036),
+  &quot;v3&quot;: round(0.8),
+  &quot;v4&quot;: round(float(&quot;-2013.256&quot;)),
+  &quot;v5&quot;: round(double(&quot;-2013.893823748327284&quot;))
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, 
&quot;v3&quot;: 1.0, &quot;v4&quot;: -2013.0, &quot;v5&quot;: -2014.0 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="sign"></a>sign</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">sign(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the sign of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the sign (a <tt>tinyint</tt>) of the argument, -1 for negative values, 0 
for 0, and 1 for positive values,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: sign(1), &quot;v2&quot;: sign(2), 
&quot;v3&quot;: sign(0), &quot;v4&quot;: sign(float(&quot;0.5&quot;)), 
&quot;v5&quot;: sign(double(&quot;-1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 1, &quot;v2&quot;: 1, &quot;v3&quot;: 0, 
&quot;v4&quot;: 1, &quot;v5&quot;: -1 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="sin"></a>sin</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">sin(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the sine value of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> sine value for the argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: sin(1), &quot;v2&quot;: sin(2), 
&quot;v3&quot;: sin(0), &quot;v4&quot;: sin(float(&quot;0.5&quot;)), 
&quot;v5&quot;: sin(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 0.8414709848078965, &quot;v2&quot;: 
0.9092974268256817, &quot;v3&quot;: 0.0, &quot;v4&quot;: 0.479425538604203, 
&quot;v5&quot;: 0.8268795405320025 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="sqrt"></a>sqrt</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">sqrt(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the square root of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> square root value for the argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: sqrt(1), &quot;v2&quot;: sqrt(2), 
&quot;v3&quot;: sqrt(0), &quot;v4&quot;: sqrt(float(&quot;0.5&quot;)), 
&quot;v5&quot;: sqrt(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 1.0, &quot;v2&quot;: 1.4142135623730951, 
&quot;v3&quot;: 0.0, &quot;v4&quot;: 0.7071067811865476, &quot;v5&quot;: 
31.622776601683793 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="tan"></a>tan</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">tan(numeric_value)
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the tangent value of the argument.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> tangent value for the argument,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-numeric input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: tan(1), &quot;v2&quot;: tan(2), 
&quot;v3&quot;: tan(0), &quot;v4&quot;: tan(float(&quot;0.5&quot;)), 
&quot;v5&quot;: tan(double(&quot;1000&quot;)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 1.5574077246549023, &quot;v2&quot;: 
-2.185039863261519, &quot;v3&quot;: 0.0, &quot;v4&quot;: 0.5463024898437905, 
&quot;v5&quot;: 1.4703241557027185 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="trunc"></a>trunc</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">trunc(numeric_value, number_digits)
+</pre></div></div>
+</li>
+<li>
+
+<p>Truncates the number to the given number of integer digits to the right of 
the decimal point (left if digits is negative). Digits is 0 if not given.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value,</li>
+<li><tt>number_digits</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt> value.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the <tt>double</tt> tangent value for the argument,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
<tt>missing</tt>,</li>
+<li>a type error will be raised if:
+<ul>
+
+<li>the first argument is any other non-numeric value,</li>
+<li>the second argument is any other non-tinyint, non-smallint, non-integer, 
and non-bigint value.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: trunc(1, 1), &quot;v2&quot;: trunc(2, 
-2), &quot;v3&quot;: trunc(0.122, 2), &quot;v4&quot;: 
trunc(float(&quot;11.52&quot;), -1), &quot;v5&quot;: 
trunc(double(&quot;1000.5252&quot;), 3) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 1, &quot;v2&quot;: 2, &quot;v3&quot;: 
0.12, &quot;v4&quot;: 10.0, &quot;v5&quot;: 1000.525 }
+</pre></div></div>
+</li>
+</ul><!--
+ ! 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.
+ !-->
+</div>
+<div class="section">
+<h3><a name="round_half_to_even"></a>round_half_to_even</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">round_half_to_even(numeric_value, [precision])
+</pre></div></div>
+</li>
+<li>
+
+<p>Computes the closest numeric value to <tt>numeric_value</tt> that is a 
multiple of ten to the power of minus <tt>precision</tt>. <tt>precision</tt> is 
optional and by default value <tt>0</tt> is used.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>numeric_value</tt>: a 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt>/<tt>float</tt>/<tt>double</tt>
 value.</li>
+<li><tt>precision</tt>: an optional 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt> field 
representing the number of digits in the fraction of the the result</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>The rounded value for the given number in the same type as the input 
argument,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>a type error will be raised if:
+<ul>
+
+<li>the first argument is any other non-numeric value,</li>
+<li>or, the second argument is any other non-tinyint, non-smallint, 
non-integer, or non-bigint value.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: round_half_to_even(2013),
+  &quot;v2&quot;: round_half_to_even(-4036),
+  &quot;v3&quot;: round_half_to_even(0.8),
+  &quot;v4&quot;: round_half_to_even(float(&quot;-2013.256&quot;)),
+  &quot;v5&quot;: 
round_half_to_even(double(&quot;-2013.893823748327284&quot;)),
+  &quot;v6&quot;: 
round_half_to_even(double(&quot;-2013.893823748327284&quot;), 2),
+  &quot;v7&quot;: round_half_to_even(2013, 4),
+  &quot;v8&quot;: round_half_to_even(float(&quot;-2013.256&quot;), 5)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 2013, &quot;v2&quot;: -4036, 
&quot;v3&quot;: 1.0, &quot;v4&quot;: -2013.0, &quot;v5&quot;: -2014.0, 
&quot;v6&quot;: -2013.89, &quot;v7&quot;: 2013, &quot;v8&quot;: -2013.256 }
+</pre></div></div>
+</li>
+</ul><!--
+ ! 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.
+ !-->
+</div></div>
+<div class="section">
+<h2><a name="String_Functions"></a><a name="StringFunctions" 
id="StringFunctions">String Functions</a></h2>
+<div class="section">
+<h3><a name="concat"></a>concat</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">concat(string1, string2, ...)
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns a concatenated string from arguments.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string1</tt>: a string value,</li>
+<li><tt>string2</tt>: a string value,</li>
+<li>&#x2026;.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a concatenated string from arguments,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">concat(&quot;test &quot;, &quot;driven &quot;, 
&quot;development&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;test driven development&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="contains"></a>contains</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">contains(string, substring_to_contain)
+</pre></div></div>
+</li>
+<li>
+
+<p>Checks whether the string <tt>string</tt> contains the string 
<tt>substring_to_contain</tt></p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might contain the given 
substring,</li>
+<li><tt>substring_to_contain</tt> : a target <tt>string</tt> that might be 
contained.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>boolean</tt> value, <tt>true</tt> if <tt>string</tt> contains 
<tt>substring_to_contain</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error,</li>
+<li><tt>false</tt> otherwise.</li>
+</ul>
+</li>
+<li>
+
+<p>Note: an <a 
href="similarity.html#UsingIndexesToSupportSimilarityQueries">n_gram index</a> 
can be utilized for this function.</p>
+</li>
+<li>Example:
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: contains(&quot;I like x-phone&quot;, 
&quot;phone&quot;), &quot;v2&quot;: contains(&quot;one&quot;, 
&quot;phone&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="ends_with"></a>ends_with</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">ends_with(string, substring_to_end_with)
+</pre></div></div>
+</li>
+<li>
+
+<p>Checks whether the string <tt>string</tt> ends with the string 
<tt>substring_to_end_with</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might end with the given 
string,</li>
+<li><tt>substring_to_end_with</tt> : a <tt>string</tt> that might be contained 
as the ending substring.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>boolean</tt> value, <tt>true</tt> if <tt>string</tt> contains 
<tt>substring_to_contain</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error,</li>
+<li><tt>false</tt> otherwise.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: ends_with(&quot; love product-b its shortcut_menu is 
awesome:)&quot;, &quot;:)&quot;),
+  &quot;v2&quot;: ends_with(&quot; awsome:)&quot;, &quot;:-)&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="initcap_.28or_title.29"></a>initcap (or title)</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">initcap(string)
+</pre></div></div>
+</li>
+<li>
+
+<p>Converts a given string <tt>string</tt> so that the first letter of each 
word is uppercase and every other letter is lowercase. The function has an 
alias called &#x201c;title&#x201d;.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be converted.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> as the title form of the given <tt>string</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: initcap(&quot;ASTERIXDB is here!&quot;), 
&quot;v2&quot;: title(&quot;ASTERIXDB is here!&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;Asterixdb Is Here!&quot;, 
&quot;v2&quot;: &quot;Asterixdb Is Here!&quot; }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="length"></a>length</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">length(string)
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns the length of the string <tt>string</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> or <tt>null</tt> that represents the 
string to be checked.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>an <tt>bigint</tt> that represents the length of <tt>string</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">length(&quot;test string&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">11
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="lower"></a>lower</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">lower(string)
+</pre></div></div>
+</li>
+<li>
+
+<p>Converts a given string <tt>string</tt> to its lowercase form.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be converted.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> as the lowercase form of the given <tt>string</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">lower(&quot;ASTERIXDB&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;asterixdb&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="ltrim"></a>ltrim</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">ltrim(string[, chars]);
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns a new string with all leading characters that appear in 
<tt>chars</tt> removed. By default, white space is the character to trim.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be trimmed,</li>
+<li><tt>chars</tt> : a <tt>string</tt> that contains characters that are used 
to trim.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a trimmed, new <tt>string</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">ltrim(&quot;me like x-phone&quot;, &quot;eml&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot; like x-phone&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="position"></a>position</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">position(string, string_pattern)
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns the first position of <tt>string_pattern</tt> within 
<tt>string</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might contain the pattern,</li>
+<li><tt>string_pattern</tt> : a pattern <tt>string</tt> to be matched.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the first position that <tt>string_pattern</tt> appears within 
<tt>string</tt> (starting at 0), or -1 if it does not appear,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: position(&quot;ppphonepp&quot;, &quot;phone&quot;),
+  &quot;v2&quot;: position(&quot;hone&quot;, &quot;phone&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 3, &quot;v2&quot;: -1 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="regexp_contains"></a>regexp_contains</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">regexp_contains(string, string_pattern[, string_flags])
+</pre></div></div>
+</li>
+<li>
+
+<p>Checks whether the strings <tt>string</tt> contains the regular expression 
pattern <tt>string_pattern</tt> (a Java regular expression pattern).</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might contain the pattern,</li>
+<li><tt>string_pattern</tt> : a pattern <tt>string</tt> to be matched,</li>
+<li><tt>string_flag</tt> : (Optional) a <tt>string</tt> with flags to be used 
during regular expression matching.
+<ul>
+
+<li>The following modes are enabled with these flags: dotall (s), multiline 
(m), case_insensitive (i), and comments and whitespace (x).</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>boolean</tt>, returns <tt>true</tt> if <tt>string</tt> contains the 
pattern <tt>string_pattern</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error,</li>
+<li><tt>false</tt> otherwise.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: regexp_contains(&quot;pphonepp&quot;, &quot;p*hone&quot;),
+  &quot;v2&quot;: regexp_contains(&quot;hone&quot;, &quot;p+hone&quot;)
+}
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="regexp_like"></a>regexp_like</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">regexp_like(string, string_pattern[, string_flags])
+</pre></div></div>
+</li>
+<li>
+
+<p>Checks whether the string <tt>string</tt> exactly matches the regular 
expression pattern <tt>string_pattern</tt> (a Java regular expression 
pattern).</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might contain the pattern,</li>
+<li><tt>string_pattern</tt> : a pattern <tt>string</tt> that might be 
contained,</li>
+<li><tt>string_flag</tt> : (Optional) a <tt>string</tt> with flags to be used 
during regular expression matching.
+<ul>
+
+<li>The following modes are enabled with these flags: dotall (s), multiline 
(m), case_insensitive (i), and comments and whitespace (x).</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>boolean</tt> value, <tt>true</tt> if <tt>string</tt> contains the 
pattern <tt>string_pattern</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error,</li>
+<li><tt>false</tt> otherwise.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: regexp_like(&quot; can't stand acast the network is 
horrible:(&quot;, &quot;.*acast.*&quot;),
+  &quot;v2&quot;: regexp_like(&quot;acast&quot;, &quot;.*acst.*&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="regexp_position"></a>regexp_position</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">regexp_position(string, string_pattern[, string_flags])
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns first position of the regular expression <tt>string_pattern</tt> (a 
Java regular expression pattern) within <tt>string</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might contain the pattern,</li>
+<li><tt>string_pattern</tt> : a pattern <tt>string</tt> to be matched,</li>
+<li><tt>string_flag</tt> : (Optional) a <tt>string</tt> with flags to be used 
during regular expression matching.
+<ul>
+
+<li>The following modes are enabled with these flags: dotall (s), multiline 
(m), case_insensitive (i), and comments and whitespace (x).</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the first position that the regular expression <tt>string_pattern</tt> 
appears in <tt>string</tt> (starting at 0), or -1 if it does not appear.</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: regexp_position(&quot;pphonepp&quot;, &quot;p*hone&quot;),
+  &quot;v2&quot;: regexp_position(&quot;hone&quot;, &quot;p+hone&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: 1, &quot;v2&quot;: -1 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="regexp_replace"></a>regexp_replace</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">regexp_replace(string, string_pattern, 
string_replacement[, string_flags])
+</pre></div></div>
+</li>
+<li>
+
+<p>Checks whether the string <tt>string</tt> matches the given regular 
expression pattern <tt>string_pattern</tt> (a Java regular expression pattern), 
and replaces the matched pattern <tt>string_pattern</tt> with the new pattern 
<tt>string_replacement</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might contain the pattern,</li>
+<li><tt>string_pattern</tt> : a pattern <tt>string</tt> to be matched,</li>
+<li><tt>string_replacement</tt> : a pattern <tt>string</tt> to be used as the 
replacement,</li>
+<li><tt>string_flag</tt> : (Optional) a <tt>string</tt> with flags to be used 
during replace.
+<ul>
+
+<li>The following modes are enabled with these flags: dotall (s), multiline 
(m), case_insensitive (i), and comments and whitespace (x).</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>Returns a <tt>string</tt> that is obtained after the replacements,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">regexp_replace(&quot; like x-phone the voicemail_service 
is awesome&quot;, &quot; like x-phone&quot;, &quot;like product-a&quot;)
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;like product-a the voicemail_service is awesome&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="repeat"></a>repeat</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">repeat(string, n)
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns a string formed by repeating the input <tt>string</tt> <tt>n</tt> 
times.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be repeated,</li>
+<li><tt>n</tt> : an 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt> value - how 
many times the string should be repeated.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a string that repeats the input <tt>string</tt> <tt>n</tt> times,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>a type error will be raised if:
+<ul>
+
+<li>the first argument is any other non-string value,</li>
+<li>or, the second argument is not a <tt>tinyint</tt>, <tt>smallint</tt>, 
<tt>integer</tt>, or <tt>bigint</tt>.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">repeat(&quot;test&quot;, 3);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;testtesttest&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="replace"></a>replace</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">replace(string, search_string, replacement_string[, limit])
+</pre></div></div>
+</li>
+<li>
+
+<p>Finds occurrences of the given substring <tt>search_string</tt> in the 
input string <tt>string</tt> and replaces them with the new substring 
<tt>replacement_string</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : an input <tt>string</tt>,</li>
+<li><tt>search_string</tt> : a <tt>string</tt>  substring to be searched 
for,</li>
+<li><tt>replacement_string</tt> : a <tt>string</tt> to be used as the 
replacement,</li>
+<li><tt>limit</tt> : (Optional) an <tt>integer</tt> - maximum number of 
occurrences to be replaced. If not specified then all occurrences will be 
replaced</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>Returns a <tt>string</tt> that is obtained after the replacements,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li>any other non-string input value or non-integer <tt>limit</tt> will cause 
a type error,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: replace(&quot; like x-phone the voicemail_service is 
awesome&quot;, &quot; like x-phone&quot;, &quot;like product-a&quot;),
+  &quot;v2&quot;: replace(&quot;x-phone and x-phone&quot;, 
&quot;x-phone&quot;, &quot;product-a&quot;, 1)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: &quot;like product-a the voicemail_service is awesome&quot;,
+  &quot;v2&quot;: &quot;product-a and x-phone&quot;
+}
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="rtrim"></a>rtrim</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">rtrim(string[, chars]);
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns a new string with all trailing characters that appear in 
<tt>chars</tt> removed. By default, white space is the character to trim.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be trimmed,</li>
+<li><tt>chars</tt> : a <tt>string</tt> that contains characters that are used 
to trim.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a trimmed, new <tt>string</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: rtrim(&quot;i like x-phone&quot;, &quot;x-phone&quot;),
+  &quot;v2&quot;: rtrim(&quot;i like x-phone&quot;, &quot;onexph&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;i like &quot;, &quot;v2&quot;: 
&quot;i like &quot; }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="split"></a>split</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">split(string, sep)
+</pre></div></div>
+</li>
+<li>
+
+<p>Splits the input <tt>string</tt> into an array of substrings separated by 
the string <tt>sep</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be split.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>an array of substrings by splitting the input <tt>string</tt> by 
<tt>sep</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">split(&quot;test driven development&quot;, &quot; &quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">[ &quot;test&quot;, &quot;driven&quot;, 
&quot;development&quot; ]
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="starts_with"></a>starts_with</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">starts_with(string, substring_to_start_with)
+</pre></div></div>
+</li>
+<li>
+
+<p>Checks whether the string <tt>string</tt> starts with the string 
<tt>substring_to_start_with</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that might start with the given 
string.</li>
+<li><tt>substring_to_start_with</tt> : a <tt>string</tt> that might be 
contained as the starting substring.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>boolean</tt>, returns <tt>true</tt> if <tt>string</tt> starts with 
the string <tt>substring_to_start_with</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error,</li>
+<li><tt>false</tt> otherwise.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot; : starts_with(&quot; like the plan, amazing&quot;, &quot; 
like&quot;),
+  &quot;v2&quot; : starts_with(&quot;I like the plan, amazing&quot;, &quot; 
like&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="substr"></a>substr</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">substr(string, offset[, length])
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns the substring from the given string <tt>string</tt> based on the 
given start offset <tt>offset</tt> with the optional <tt>length</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be extracted,</li>
+<li><tt>offset</tt> : an 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt> value as 
the starting offset of the substring in <tt>string</tt> (starting at 0),</li>
+<li><tt>length</tt> : (Optional) an an 
<tt>tinyint</tt>/<tt>smallint</tt>/<tt>integer</tt>/<tt>bigint</tt> value as 
the length of the substring.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> that represents the substring,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>a type error will be raised if:
+<ul>
+
+<li>the first argument is any other non-string value,</li>
+<li>or, the second argument is not a <tt>tinyint</tt>, <tt>smallint</tt>, 
<tt>integer</tt>, or <tt>bigint</tt>,</li>
+<li>or, the third argument is not a <tt>tinyint</tt>, <tt>smallint</tt>, 
<tt>integer</tt>, or <tt>bigint</tt> if the argument is present.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">substr(&quot;test string&quot;, 6, 3);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;str&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="trim"></a>trim</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">trim(string[, chars]);
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns a new string with all leading characters that appear in 
<tt>chars</tt> removed. By default, white space is the character to trim.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be trimmed,</li>
+<li><tt>chars</tt> : a <tt>string</tt> that contains characters that are used 
to trim.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a trimmed, new <tt>string</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">trim(&quot;i like x-phone&quot;, &quot;xphoen&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot; like &quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="upper"></a>upper</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">upper(string)
+</pre></div></div>
+</li>
+<li>
+
+<p>Converts a given string <tt>string</tt> to its uppercase form.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be converted.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> as the uppercase form of the given <tt>string</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">upper(&quot;hello&quot;)
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;HELLO&quot;
+</pre></div></div>
+</li>
+</ul><!--
+ ! 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.
+ !-->
+</div>
+<div class="section">
+<h3><a name="string_concat"></a>string_concat</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">string_concat(array)
+</pre></div></div>
+</li>
+<li>
+
+<p>Concatenates an array of strings <tt>array</tt> into a single string.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>array</tt> : an <tt>array</tt> or <tt>multiset</tt> of 
<tt>string</tt>s (could be <tt>null</tt> or <tt>missing</tt>) to be 
concatenated.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the concatenated <tt>string</tt> value,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li><tt>missing</tt> if any element in the input array is 
<tt>missing</tt>,</li>
+<li><tt>null</tt> if any element in the input array is <tt>null</tt> but no 
element in the input array is <tt>missing</tt>,</li>
+<li>any other non-array input value or non-integer element in the input array 
will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">string_concat([&quot;ASTERIX&quot;, &quot; &quot;, 
&quot;ROCKS!&quot;]);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;ASTERIX ROCKS!&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="string_join"></a>string_join</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">string_join(array, string)
+</pre></div></div>
+</li>
+<li>
+
+<p>Joins an array or multiset of strings <tt>array</tt> with the given 
separator <tt>string</tt> into a single string.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>array</tt> : an <tt>array</tt> or <tt>multiset</tt> of strings (could 
be <tt>null</tt>) to be joined.</li>
+<li><tt>string</tt> : a <tt>string</tt> to serve as the separator.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>the joined <tt>string</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li><tt>missing</tt> if the first argument array contains a 
<tt>missing</tt>,</li>
+<li><tt>null</tt> if the first argument array contains a <tt>null</tt> but 
does not contain a <tt>missing</tt>,</li>
+<li>a type error will be raised if:
+<ul>
+
+<li>the first argument is any other non-array value, or contains any other 
non-string value,</li>
+<li>or, the second argument is any other non-string value.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">string_join([&quot;ASTERIX&quot;, &quot;ROCKS~&quot;], 
&quot;!! &quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;ASTERIX!! ROCKS~&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="string_to_codepoint"></a>string_to_codepoint</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">string_to_codepoint(string)
+</pre></div></div>
+</li>
+<li>
+
+<p>Converts the string <tt>string</tt> to its code_based representation.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> that will be converted.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>an <tt>array</tt> of the code points for the string <tt>string</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">string_to_codepoint(&quot;Hello ASTERIX!&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">[ 72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 
33 ]
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="codepoint_to_string"></a>codepoint_to_string</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">codepoint_to_string(array)
+</pre></div></div>
+</li>
+<li>
+
+<p>Converts the ordered code_based representation <tt>array</tt> to the 
corresponding string.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>array</tt> : an <tt>array</tt> of integer code_points.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> representation of <tt>array</tt>.</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li><tt>missing</tt> if any element in the input array is 
<tt>missing</tt>,</li>
+<li><tt>null</tt> if any element in the input array is <tt>null</tt> but no 
element in the input array is <tt>missing</tt>,</li>
+<li>any other non-array input value or non-integer element in the input array 
will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">codepoint_to_string([72, 101, 108, 108, 111, 32, 65, 83, 
84, 69, 82, 73, 88, 33]);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;Hello ASTERIX!&quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="substring_before"></a>substring_before</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">substring_before(string, string_pattern)
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns the substring from the given string <tt>string</tt> before the 
given pattern <tt>string_pattern</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be extracted.</li>
+<li><tt>string_pattern</tt> : a <tt>string</tt> pattern to be searched.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> that represents the substring,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">substring_before(&quot; like x-phone&quot;, 
&quot;x-phone&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot; like &quot;
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="substring_after"></a>substring_after</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+<p>substring_after(string, string_pattern);</p>
+</li>
+<li>
+
+<p>Returns the substring from the given string <tt>string</tt> after the given 
pattern <tt>string_pattern</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : a <tt>string</tt> to be extracted.</li>
+<li><tt>string_pattern</tt> : a <tt>string</tt> pattern to be searched.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> that represents the substring,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">substring_after(&quot; like x-phone&quot;, 
&quot;xph&quot;);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">&quot;one&quot;
+</pre></div></div>
+</li>
+</ul><!--
+ ! 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.
+ !-->
+</div></div>
+<div class="section">
+<h2><a name="Binary_Functions"></a><a name="BinaryFunctions" 
id="BinaryFunctions">Binary Functions</a></h2>
+<div class="section">
+<h3><a name="parse_binary"></a>parse_binary</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+<p>parse_binary(string, encoding)</p>
+</li>
+<li>
+
+<p>Creates a <tt>binary</tt> from an string encoded in <tt>encoding</tt> 
format.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>string</tt> : an encoded <tt>string</tt>,</li>
+<li><tt>encoding</tt> : a string notation specifies the encoding type of the 
given <tt>string</tt>. Currently we support <tt>hex</tt> and <tt>base64</tt> 
format.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>binary</tt> that is decoded from the given <tt>string</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+<p>[ parse_binary(&#x201c;ABCDEF0123456789&#x201d;,&#x201c;hex&#x201d;), 
parse_binary(&#x201c;abcdef0123456789&#x201d;,&#x201c;HEX&#x201d;), 
parse_binary(&#x2018;QXN0ZXJpeAE=&#x2019;,&#x201c;base64&#x201d;) ];</p>
+</li>
+<li>
+
+<p>The expected result is:</p>
+<p>[ hex(&#x201c;ABCDEF0123456789&#x201d;), 
hex(&#x201c;ABCDEF0123456789&#x201d;), hex(&#x201c;4173746572697801&#x201d;) 
]</p>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="print_binary"></a>print_binary</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+<p>print_binary(binary, encoding)</p>
+</li>
+<li>
+
+<p>Prints a <tt>binary</tt> to the required encoding <tt>string</tt> 
format.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>binary</tt> : a <tt>binary</tt> data need to be printed.</li>
+<li><tt>encoding</tt> : a string notation specifies the expected encoding 
type. Currently we support <tt>hex</tt> and <tt>base64</tt> format.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>string</tt> that represents the encoded format of a 
<tt>binary</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-string input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">[ print_binary(hex(&quot;ABCDEF0123456789&quot;), 
&quot;base64&quot;), print_binary(base64(&quot;q83vASNFZ4k=&quot;), 
&quot;hex&quot;) ]
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result are:</p>
+
+<div>
+<div>
+<pre class="source">[ &quot;q83vASNFZ4k=&quot;, &quot;ABCDEF0123456789&quot; ]
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="binary_length"></a>binary_length</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+<p>binary_length(binary)</p>
+</li>
+<li>
+
+<p>Returns the number of bytes storing the binary data.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>binary</tt> : a <tt>binary</tt> value to be checked.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>an <tt>bigint</tt> that represents the number of bytes,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-binary input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">binary_length(hex(&quot;00AA&quot;))
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+<p>2</p>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="sub_binary"></a>sub_binary</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+<p>sub_binary(binary, offset[, length])</p>
+</li>
+<li>
+
+<p>Returns the sub binary from the given <tt>binary</tt> based on the given 
start offset with the optional <tt>length</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>binary</tt> : a <tt>binary</tt> to be extracted,</li>
+<li><tt>offset</tt> : a <tt>tinyint</tt>, <tt>smallint</tt>, <tt>integer</tt>, 
or <tt>bigint</tt> value as the starting offset of the sub binary in 
<tt>binary</tt> (starting at 0),</li>
+<li><tt>length</tt> : (Optional) a <tt>tinyint</tt>, <tt>smallint</tt>, 
<tt>integer</tt>, or <tt>bigint</tt> value as the length of the sub binary.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>binary</tt> that represents the sub binary,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>a type error will be raised if:
+<ul>
+
+<li>the first argument is any other non-binary value,</li>
+<li>or, the second argument is any other non-integer value,</li>
+<li>or, the third argument is any other non-integer value, if it is 
present.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">sub_binary(hex(&quot;AABBCCDD&quot;), 4);
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is</p>
+
+<div>
+<div>
+<pre class="source">hex(&quot;DD&quot;)
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="binary_concat"></a>binary_concat</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+<p>binary_concat(array)</p>
+</li>
+<li>
+
+<p>Concatenates a binary <tt>array</tt> or <tt>multiset</tt> into a single 
binary.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>array</tt> : an <tt>array</tt> or <tt>multiset</tt> of binaries (could 
be <tt>null</tt> or <tt>missing</tt>) to be concatenated.</li>
+</ul>
+</li>
+<li>Return Value  :
+<ul>
+
+<li>the concatenated <tt>binary</tt> value,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li><tt>missing</tt> if any element in the input array is 
<tt>missing</tt>,</li>
+<li><tt>null</tt> if any element in the input array is <tt>null</tt> but no 
element in the input array is <tt>missing</tt>,</li>
+<li>any other non-array input value or non-binary element in the input array 
will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+<p>binary_concat([hex(&#x201c;42&#x201d;), hex(&quot;&quot;), 
hex(&#x2018;42&#x2019;)]);</p>
+</li>
+<li>
+
+<p>The expected result is</p>
+<p>hex(&#x201c;4242&#x201d;)</p>
+</li>
+</ul><!--
+ ! 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.
+ !-->
+</div></div>
+<div class="section">
+<h2><a name="Spatial_Functions"></a><a name="SpatialFunctions" 
id="SpatialFunctions">Spatial Functions</a></h2>
+<div class="section">
+<h3><a name="create_point"></a>create_point</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">create_point(x, y)
+</pre></div></div>
+</li>
+<li>
+
+<p>Creates the primitive type <tt>point</tt> using an <tt>x</tt> and 
<tt>y</tt> value.</p>
+</li>
+<li>Arguments:</li>
+<li><tt>x</tt> : a <tt>double</tt> that represents the x-coordinate,</li>
+<li><tt>y</tt> : a <tt>double</tt> that represents the y-coordinate.</li>
+<li>Return Value:</li>
+<li>a <tt>point</tt> representing the ordered pair (<tt>x</tt>, 
<tt>y</tt>),</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-double input value will cause a type error.</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;point&quot;: create_point(30.0,70.0) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;point&quot;: point(&quot;30.0,70.0&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="create_line"></a>create_line</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">create_line(point1, point2)
+</pre></div></div>
+</li>
+<li>
+
+<p>Creates the primitive type <tt>line</tt> using <tt>point1</tt> and 
<tt>point2</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>point1</tt> : a <tt>point</tt> that represents the start point of the 
line.</li>
+<li><tt>point2</tt> : a <tt>point</tt> that represents the end point of the 
line.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a spatial <tt>line</tt> created using the points provided in 
<tt>point1</tt> and <tt>point2</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-point input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;line&quot;: create_line(create_point(30.0,70.0), 
create_point(50.0,90.0)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;line&quot;: line(&quot;30.0,70.0 50.0,90.0&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="create_rectangle"></a>create_rectangle</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">create_rectangle(point1, point2)
+</pre></div></div>
+</li>
+<li>
+
+<p>Creates the primitive type <tt>rectangle</tt> using <tt>point1</tt> and 
<tt>point2</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>point1</tt> : a <tt>point</tt> that represents the lower_left point of 
the rectangle.</li>
+<li><tt>point2</tt> : a <tt>point</tt> that represents the upper_right point 
of the rectangle.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a spatial <tt>rectangle</tt> created using the points provided in 
<tt>point1</tt> and <tt>point2</tt>,</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>any other non-point input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;rectangle&quot;: 
create_rectangle(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;rectangle&quot;: rectangle(&quot;30.0,70.0 
50.0,90.0&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="create_circle"></a>create_circle</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">create_circle(point, radius)
+</pre></div></div>
+</li>
+<li>
+
+<p>Creates the primitive type <tt>circle</tt> using <tt>point</tt> and 
<tt>radius</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>point</tt> : a <tt>point</tt> that represents the center of the 
circle.</li>
+<li><tt>radius</tt> : a <tt>double</tt> that represents the radius of the 
circle.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a spatial <tt>circle</tt> created using the center point and the radius 
provided in <tt>point</tt> and <tt>radius</tt>.</li>
+<li><tt>missing</tt> if any argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if any argument is a <tt>null</tt> value but no argument is 
a <tt>missing</tt> value,</li>
+<li>a type error will be raised if:
+<ul>
+
+<li>the first argument is any other non-point value,</li>
+<li>or, the second argument is any other non-double value.</li>
+</ul>
+</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;circle&quot;: 
create_circle(create_point(30.0,70.0), 5.0) }
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;circle&quot;: circle(&quot;30.0,70.0 5.0&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="create_polygon"></a>create_polygon</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">create_polygon(array)
+</pre></div></div>
+</li>
+<li>
+
+<p>Creates the primitive type <tt>polygon</tt> using the double values 
provided in the argument <tt>array</tt>. Each two consecutive double values 
represent a point starting from the first double value in the array. Note that 
at least six double values should be specified, meaning a total of three 
points.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>array</tt> : an array of doubles representing the points of the 
polygon.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>polygon</tt>, represents a spatial simple polygon created using the 
points provided in <tt>array</tt>.</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li><tt>missing</tt> if any element in the input array is 
<tt>missing</tt>,</li>
+<li><tt>null</tt> if any element in the input array is <tt>null</tt> but no 
element in the input array is <tt>missing</tt>,</li>
+<li>any other non-array input value or non-double element in the input array 
will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;polygon&quot;: 
create_polygon([1.0,1.0,2.0,2.0,3.0,3.0,4.0,4.0]) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;polygon&quot;: polygon(&quot;1.0,1.0 2.0,2.0 
3.0,3.0 4.0,4.0&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="get_x.2Fget_y"></a>get_x/get_y</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">get_x(point) or get_y(point)
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns the x or y coordinates of a point <tt>point</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>point</tt> : a <tt>point</tt>.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>a <tt>double</tt> representing the x or y coordinates of the point 
<tt>point</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-point input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;x_coordinate&quot;: get_x(create_point(2.3,5.0)), 
&quot;y_coordinate&quot;: get_y(create_point(2.3,5.0)) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;x_coordinate&quot;: 2.3, &quot;y_coordinate&quot;: 
5.0 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="get_points"></a>get_points</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<div>
+<pre class="source">get_points(spatial_object)
+</pre></div></div>
+</li>
+<li>
+
+<p>Returns an ordered array of the points forming the spatial object 
<tt>spatial_object</tt>.</p>
+</li>
+<li>Arguments:
+<ul>
+
+<li><tt>spatial_object</tt> : a <tt>point</tt>, <tt>line</tt>, 
<tt>rectangle</tt>, <tt>circle</tt>, or <tt>polygon</tt>.</li>
+</ul>
+</li>
+<li>Return Value:
+<ul>
+
+<li>an <tt>array</tt> of the points forming the spatial object 
<tt>spatial_object</tt>,</li>
+<li><tt>missing</tt> if the argument is a <tt>missing</tt> value,</li>
+<li><tt>null</tt> if the argument is a <tt>null</tt> value,</li>
+<li>any other non-spatial-object input value will cause a type error.</li>
+</ul>
+</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre 
class="source">get_points(create_polygon([1.0,1.0,2.0,2.0,3.0,3.0,4.0,4.0]))
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">[ point(&quot;1.0,1.0&quot;), point(&quot;2.0,2.0&quot;), 
point(&quot;3.0,3.0&quot;), point(&quot;4.0,4.0&quot;) ]
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="get_center.2Fget_radius"></a>get_center/get_r

<TRUNCATED>

Reply via email to