You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by im...@apache.org on 2018/10/12 21:47:55 UTC

[01/17] asterixdb-site git commit: fix missing docs and url

Repository: asterixdb-site
Updated Branches:
  refs/heads/asf-site d00eca894 -> b2f1d3e6d


http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/sqlpp/primer-sqlpp.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/sqlpp/primer-sqlpp.html b/docs/0.9.4/sqlpp/primer-sqlpp.html
index d0f6ca5..1a935a1 100644
--- a/docs/0.9.4/sqlpp/primer-sqlpp.html
+++ b/docs/0.9.4/sqlpp/primer-sqlpp.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/primer-sqlpp.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/primer-sqlpp.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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181012" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB 101: An ADM and SQL++ Primer</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,7 +26,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
+        <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>
@@ -40,26 +40,26 @@
     <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 class="active"><a href="#"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></li>
+    <li class="active"><a href="#"><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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/sqlpp/similarity.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/sqlpp/similarity.html b/docs/0.9.4/sqlpp/similarity.html
new file mode 100644
index 0000000..6f100ae
--- /dev/null
+++ b/docs/0.9.4/sqlpp/similarity.html
@@ -0,0 +1,310 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/similarity.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; AsterixDB  Support of Similarity Queries</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>AsterixDB  Support of Similarity Queries</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="#Motivation">Motivation</a></li>
+<li><a href="#DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a></li>
+<li><a href="#SimilaritySelectionQueries">Similarity Selection Queries</a></li>
+<li><a href="#SimilarityJoinQueries">Similarity Join Queries</a></li>
+<li><a href="#UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Similarity queries are widely used in applications where users need to find objects that satisfy a similarity predicate, while exact matching is not sufficient. These queries are especially important for social and Web applications, where errors, abbreviations, and inconsistencies are common.  As an example, we may want to find all the movies starring Schwarzenegger, while we don&#x2019;t know the exact spelling of his last name (despite his popularity in both the movie industry and politics :-)). As another example, we want to find all the Facebook users who have similar friends. To meet this type of needs, AsterixDB supports similarity queries using efficient indexes and algorithms.</p></div>
+<div class="section">
+<h2><a name="Data_Types_and_Similarity_Functions_.5BBack_to_TOC.5D"></a><a name="DataTypesAndSimilarityFunctions" id="DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> (on strings) and <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a> (on sets).  For instance, in our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, the <tt>friend-ids</tt> of a Facebook user forms a set of friends, and we can define a similarity between the sets of friends of two users. We can also convert a string to a set of grams of a length &#x201c;n&#x201d; (called &#x201c;n-grams&#x201d;) and define the Jaccard similarity between the two gram sets of the two strings. Formally, the &#x201c;n-grams&#x201d; of a string are its substrings of length &#x201c;n&#x201d;. For instance, the 3-grams of the string <tt>schwarzenegger</tt> are <tt>sch</tt>, <tt>chw</tt>, <tt>hwa</tt>, &#x2026;, <tt>ger</tt>.</p>
+<p>AsterixDB provides <a href="functions.html#Tokenizing_Functions">tokenization functions</a> to convert strings to sets, and the <a href="functions.html#Similarity_Functions">similarity functions</a>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Selection_Queries_.5BBack_to_TOC.5D"></a><a name="SimilaritySelectionQueries" id="SimilaritySelectionQueries">Similarity Selection Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The following query asks for all the Facebook users whose name is similar to <tt>Suzanna Tilson</tt>, i.e., their edit distance is at most 2.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div>
+
+<p>The following query asks for all the Facebook users whose set of friend ids is similar to <tt>[1,5,9,10]</tt>, i.e., their Jaccard similarity is at least 0.6.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div>
+
+<p>AsterixDB allows a user to use a similarity operator <tt>~=</tt> to express a condition by defining the similarity function and threshold using &#x201c;set&#x201d; statements earlier. For instance, the above query can be equivalently written as:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.6f&quot;;
+
+    for $user in dataset('FacebookUsers')
+    where $user.friend-ids ~= [1,5,9,10]
+    return $user
+</pre></div></div>
+
+<p>In this query, we first declare Jaccard as the similarity function using <tt>simfunction</tt> and then specify the threshold <tt>0.6f</tt> using <tt>simthreshold</tt>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Join_Queries_.5BBack_to_TOC.5D"></a><a name="SimilarityJoinQueries" id="SimilarityJoinQueries">Similarity Join Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports fuzzy joins between two sets. The following <a href="primer.html#Query_5_-_Fuzzy_Join">query</a> finds, for each Facebook user, all Twitter users with names similar to their name based on the edit distance.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+
+    for $fbu in dataset FacebookUsers
+    return {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: for $t in dataset TweetMessages
+                            let $tu := $t.user
+                            where $tu.name ~= $fbu.name
+                            return {
+                            &quot;twitter-screenname&quot;: $tu.screen-name,
+                            &quot;twitter-name&quot;: $tu.name
+                            }
+    };
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="Using_Indexes_to_Support_Similarity_Queries_.5BBack_to_TOC.5D"></a><a name="UsingIndexesToSupportSimilarityQueries" id="UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB uses two types of indexes to support similarity queries, namely &#x201c;ngram index&#x201d; and &#x201c;keyword index&#x201d;.</p>
+<div class="section">
+<h3><a name="NGram_Index"></a>NGram Index</h3>
+<p>An &#x201c;ngram index&#x201d; is constructed on a set of strings.  We generate n-grams for each string, and build an inverted list for each n-gram that includes the ids of the strings with this gram.  A similarity query can be answered efficiently by accessing the inverted lists of the grams in the query and counting the number of occurrences of the string ids on these inverted lists.  The similar idea can be used to answer queries with Jaccard similarity.  A detailed description of these techniques is available at this <a class="externalLink" href="http://www.ics.uci.edu/~chenli/pub/icde2009-memreducer.pdf">paper</a>.</p>
+<p>For instance, the following DDL statements create an ngram index on the <tt>FacebookUsers.name</tt> attribute using an inverted index of 3-grams.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    create index fbUserIdx on FacebookUsers(name) type ngram(3);
+</pre></div></div>
+
+<p>The number &#x201c;3&#x201d; in &#x201c;ngram(3)&#x201d; is the length &#x201c;n&#x201d; in the grams. This index can be used to optimize similarity queries on this attribute using <a href="functions.html#edit-distance">edit-distance</a>, <a href="functions.html#edit-distance-check">edit-distance-check</a>, <a href="functions.html#similarity-jaccard">similarity-jaccard</a>, or <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a> queries on this attribute where the similarity is defined on sets of 3-grams.  This index can also be used to optimize queries with the &#x201c;<a href="(functions.html#contains">contains()</a>&#x201d; predicate (i.e., substring matching) since it can be also be solved by counting on the inverted lists of the grams in the query string.</p>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance"></a>NGram Index usage case - <a href="functions.html#edit-distance">edit-distance</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance-check"></a>NGram Index usage case - <a href="functions.html#edit-distance-check">edit-distance-check</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
+    where $ed[0]
+    return $ed[1]
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard">similarity-jaccard</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard-check"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
+    where $sim[0]
+    return $user
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_contains.28.29"></a>NGram Index usage case - <a href="(functions.html#contains">contains()</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $i in dataset('FacebookMessages')
+    where contains($i.message, &quot;phone&quot;)
+    return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
+</pre></div></div>
+</div></div>
+<div class="section">
+<h3><a name="Keyword_Index"></a>Keyword Index</h3>
+<p>A &#x201c;keyword index&#x201d; is constructed on a set of strings or sets (e.g., OrderedList, UnorderedList). Instead of generating grams as in an ngram index, we generate tokens (e.g., words) and for each token, construct an inverted list that includes the ids of the objects with this token.  The following two examples show how to create keyword index on two different types:</p>
+<div class="section">
+<h4><a name="Keyword_Index_on_String_Type"></a>Keyword Index on String Type</h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    drop index FacebookMessages.fbMessageIdx if exists;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    for $o in dataset('FacebookMessages')
+    let $jacc := similarity-jaccard-check(word-tokens($o.message), word-tokens(&quot;love like ccast&quot;), 0.2f)
+    where $jacc[0]
+    return $o
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="Keyword_Index_on_UnorderedList_Type"></a>Keyword Index on UnorderedList Type</h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    create index fbUserIdx_fids on FacebookUsers(friend-ids) type keyword;
+
+    for $c in dataset('FacebookUsers')
+    let $jacc := similarity-jaccard-check($c.friend-ids, {{3,10}}, 0.5f)
+    where $jacc[0]
+    return $c
+</pre></div></div>
+
+<p>As shown above, keyword index can be used to optimize queries with token-based similarity predicates, including <a href="functions.html#similarity-jaccard">similarity-jaccard</a> and <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a>.</p></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/udf.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/udf.html b/docs/0.9.4/udf.html
index 83f7114..65bc7bb 100644
--- a/docs/0.9.4/udf.html
+++ b/docs/0.9.4/udf.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/udf.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/udf.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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181012" />
     <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Support for User Defined Functions in AsterixDB</title>
+    <title>AsterixDB &#x2013; User-defined 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" />
@@ -26,7 +26,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
+        <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>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
+    <li><a href="feeds.html" title="Data Ingestion with Feeds"><span class="none"></span>Data Ingestion with Feeds</a></li>
     <li class="active"><a href="#"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">
@@ -90,160 +90,173 @@
  ! specific language governing permissions and limitations
  ! under the License.
  !-->
-<h1>Support for User Defined Functions in AsterixDB</h1>
+<h1>User-defined Functions</h1>
 <div class="section">
 <h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
 <ul>
 
-<li><a href="#PreprocessingCollectedData">Using UDF to preprocess feed-collected data</a></li>
-<li><a href="#WritingAnExternalUDF">Writing an External UDF</a></li>
-<li><a href="#CreatingAnAsterixDBLibrary">Creating an AsterixDB Library</a></li>
-<li><a href="#installingUDF">Installing an AsterixDB Library</a></li>
-</ul>
-<p>In this document, we describe the support for implementing, using, and installing user-defined functions (UDF) in AsterixDB. We will explain how we can use UDFs to preprocess, e.g., data collected using feeds (see the <a href="feeds/tutorial.html">feeds tutorial</a>).</p>
+<li><a href="#introduction">Introduction</a></li>
+<li><a href="#installingUDF">Installing an UDF Library</a></li>
+<li><a href="#UDFOnFeeds">Attaching an UDF on Data Feeds</a></li>
+<li><a href="#udfConfiguration">A quick look of the UDF configuration</a></li>
+<li><a href="#uninstall">Unstalling an UDF Library</a><!--
+! 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.
+!--></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction"></a><a name="introduction">Introduction</a></h2>
+<p>Apache AsterixDB supports two languages for writing user-defined functions (UDFs): SQL++ and Java. A user can encapsulate data processing logic into a UDF and invoke it later repeatedly. For SQL++ functions, a user can refer to <a href="sqlpp/manual.html#Functions">SQL++ Functions</a> for their usages. In this document, we focus on how to install/invoke/uninstall a Java function library using the Ansible script that we provide.</p></div>
 <div class="section">
-<h3><a name="Installing_an_AsterixDB_Library"></a><a name="installingUDF">Installing an AsterixDB Library</a></h3>
-<p>We assume you have followed the <a href="../install.html">installation instructions</a> to set up a running AsterixDB instance. Let us refer your AsterixDB instance by the name &#x201c;my_asterix&#x201d;.</p>
+<h2><a name="Installing_an_UDF_Library"></a><a name="installingUDF">Installing an UDF Library</a></h2>
+<p>UDFs have to be installed offline. This section describes the process assuming that you have followed the preceding <a href="ansible.html">ansible installation instructions</a> to deploy an AsterixDB instance on your local machine or cluster. Here are the instructions to install an UDF library:</p>
 <ul>
 
 <li>
 
-<p>Step 1: Stop the AsterixDB instance if it is in the ACTIVE state.</p>
+<p>Step 1: Stop the AsterixDB instance if it is ACTIVE.</p>
 
 <div>
 <div>
-<pre class="source">$ managix stop -n my_asterix
+<pre class="source">$ bin/stop.sh
 </pre></div></div>
 </li>
 <li>
 
-<p>Step 2: Install the library using Managix install command. Just to illustrate, we use the help command to look up the syntax</p>
+<p>Step 2: Deploy the UDF package.</p>
 
 <div>
 <div>
-<pre class="source">$ managix help  -cmd install
-Installs a library to an asterix instance.
-Options
-n  Name of Asterix Instance
-d  Name of the dataverse under which the library will be installed
-l  Name of the library
-p  Path to library zip bundle
+<pre class="source">$ bin/udf.sh -m i -d DATAVERSE_NAME -l LIBRARY_NAME -p UDF_PACKAGE_PATH
 </pre></div></div>
 </li>
-</ul>
-<p>Above is a sample output and explains the usage and the required parameters. Each library has a name and is installed under a dataverse. Recall that we had created a dataverse by the name - &#x201c;feeds&#x201d; prior to  creating our datatypes and dataset. We shall name our library - &#x201c;testlib&#x201d;.</p>
-<p>We assume you have a library zip bundle that needs to be installed. To install the library, use the Managix install command. An example is shown below.</p>
+<li>
+
+<p>Step 3: Start AsterixDB</p>
 
 <div>
 <div>
-<pre class="source">    $ managix install -n my_asterix -d feeds -l testlib -p extlibs/asterix-external-data-0.8.7-binary-assembly.zip
+<pre class="source">$ bin/start.sh
 </pre></div></div>
-
-<p>You should see the following message:</p>
+</li>
+</ul>
+<p>After AsterixDB starts, you can use the following query to check whether your UDFs have been sucessfully registered with the system.</p>
 
 <div>
 <div>
-<pre class="source">    INFO: Installed library testlib
+<pre class="source">    SELECT * FROM Metadata.`Function`;
 </pre></div></div>
 
-<p>We shall next start our AsterixDB instance using the start command as shown below.</p>
+<p>In the AsterixDB source release, we provide several sample UDFs that you can try out. You need to build the AsterixDB source to get the compiled UDF package. It can be found under the <tt>asterixdb-external</tt> sub-project. Assuming that these UDFs have been installed into the <tt>udfs</tt> dataverse and <tt>testlib</tt> library, here is an example that uses the sample UDF <tt>mysum</tt> to compute the sum of two input integers.</p>
 
 <div>
 <div>
-<pre class="source">    $ managix start -n my_asterix
-</pre></div></div>
+<pre class="source">    use udfs;
 
-<p>You may now use the AsterixDB library in AQL statements and queries. To look at the installed artifacts, you may execute the following query at the AsterixDB web-console.</p>
+    testlib#mysum(3,4);
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="Attaching_a_UDF_on_Data_Feeds"></a><a name="UDFOnFeeds" id="UDFOnFeeds">Attaching a UDF on Data Feeds</a></h2>
+<p>In <a href="feeds.html">Data Ingestion using feeds</a>, we introduced an efficient way for users to get data into AsterixDB. In some use cases, users may want to pre-process the incoming data before storing it into the dataset. To meet this need, AsterixDB allows the user to attach a UDF onto the ingestion pipeline. Following the example in <a href="feeds.html">Data Ingestion</a>, here we show an example of how to attach a UDF that extracts the user names mentioned from the incoming Tweet text, storing the processed Tweets into a dataset.</p>
+<p>We start by creating the datatype and dataset that will be used for the feed and UDF. One thing to keep in mind is that data flows from the feed to the UDF and then to the dataset. This means that the feed&#x2019;s datatype should be the same as the input type of the UDF, and the output datatype of the UDF should be the same as the dataset&#x2019;s datatype. Thus, users should make sure that their datatypes are consistent in the UDF configuration. Users can also take advantage of open datatypes in AsterixDB by creating a minimum description of the data for simplicity. Here we use open datatypes:</p>
 
 <div>
 <div>
-<pre class="source">    for $x in dataset Metadata.Function
-    return $x
+<pre class="source">    use udfs;
+
+    create type TweetType if not exists as open {
+        id: int64
+    };
 
-    for $x in dataset Metadata.Library
-    return $x
+    create dataset ProcessedTweets(TweetType) primary key id;
 </pre></div></div>
 
-<p>Our library is now installed and is ready to be used.</p></div></div>
-<div class="section">
-<h2><a name="Preprocessing_Collected_Data"></a><a name="PreprocessingCollectedData" id="PreprocessingCollectedData">Preprocessing Collected Data</a></h2>
-<p>In the following we assume that you already created the <tt>TwitterFeed</tt> and its corresponding data types and dataset following the instruction explained in the <a href="feeds/tutorial.html">feeds tutorial</a>.</p>
-<p>A feed definition may optionally include the specification of a user-defined function that is to be applied to each feed object prior to persistence. Examples of pre-processing might include adding attributes, filtering out objects, sampling, sentiment analysis, feature extraction, etc. We can express a UDF, which can be defined in AQL or in a programming language such as Java, to perform such pre-processing. An AQL UDF is a good fit when pre-processing a object requires the result of a query (join or aggregate) over data contained in AsterixDB datasets. More sophisticated processing such as sentiment analysis of text is better handled by providing a Java UDF. A Java UDF has an initialization phase that allows the UDF to access any resources it may need to initialize itself prior to being used in a data flow. It is assumed by the AsterixDB compiler to be stateless and thus usable as an embarrassingly parallel black box. In contrast, the AsterixDB compiler can reason about an AQL 
 UDF and involve the use of indexes during its invocation.</p>
-<p>We consider an example transformation of a raw tweet into its lightweight version called <tt>ProcessedTweet</tt>, which is defined next.</p>
+<p>As the <tt>TweetType</tt> is an open datatype, processed Tweets can be stored into the dataset after they are annotated with an extra attribute. Given the datatype and dataset above, we can create a Twitter Feed with the same datatype. Please refer to section <a href="feeds.html">Data Ingestion</a> if you have any trouble in creating feeds.</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
-
-    create type ProcessedTweet if not exists as open {
-        id: string,
-        user_name:string,
-        location:point,
-        created_at:string,
-        message_text:string,
-        country: string,
-        topics: {{string}}
+<pre class="source">    use udfs;
+
+    create feed TwitterFeed with {
+      &quot;adapter-name&quot;: &quot;push_twitter&quot;,
+      &quot;type-name&quot;: &quot;TweetType&quot;,
+      &quot;format&quot;: &quot;twitter-status&quot;,
+      &quot;consumer.key&quot;: &quot;************&quot;,
+      &quot;consumer.secret&quot;: &quot;************&quot;,
+      &quot;access.token&quot;: &quot;**********&quot;,
+      &quot;access.token.secret&quot;: &quot;*************&quot;
     };
-
-    create dataset ProcessedTweets(ProcessedTweet)
-    primary key id;
 </pre></div></div>
 
-<p>The processing required in transforming a collected tweet to its lighter version of type <tt>ProcessedTweet</tt> involves extracting the topics or hash-tags (if any) in a tweet and collecting them in the referred &#x201c;topics&#x201d; attribute for the tweet. Additionally, the latitude and longitude values (doubles) are combined into the spatial point type. Note that spatial data types are considered as first-class citizens that come with the support for creating indexes. Next we show a revised version of our example TwitterFeed that involves the use of a UDF. We assume that the UDF that contains the transformation logic into a &#x201c;ProcessedTweet&#x201d; is available as a Java UDF inside an AsterixDB library named &#x2018;testlib&#x2019;. We defer the writing of a Java UDF and its installation as part of an AsterixDB library to a later section of this document.</p>
+<p>After creating the feed, we attach the UDF onto the feed pipeline and start the feed with following statements:</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
+<pre class="source">    use udfs;
 
-    create feed ProcessedTwitterFeed if not exists
-    using &quot;push_twitter&quot;
-    ((&quot;type-name&quot;=&quot;Tweet&quot;),
-    (&quot;consumer.key&quot;=&quot;************&quot;),
-    (&quot;consumer.secret&quot;=&quot;**************&quot;),
-    (&quot;access.token&quot;=&quot;**********&quot;),
-    (&quot;access.token.secret&quot;=&quot;*************&quot;))
+    connect feed TwitterFeed to dataset ProcessedTweets apply function udfs#addMentionedUsers;
 
-    apply function testlib#addHashTagsInPlace;
+    start feed TwitterFeed;
 </pre></div></div>
 
-<p>Note that a feed adaptor and a UDF act as pluggable components. These contribute towards providing a generic &#x201c;plug-and-play&#x201d; model where custom implementations can be provided to cater to specific requirements.</p>
-<div class="section">
-<div class="section">
-<h4><a name="Building_a_Cascade_Network_of_Feeds"></a>Building a Cascade Network of Feeds</h4>
-<p>Multiple high-level applications may wish to consume the data ingested from a data feed. Each such application might perceive the feed in a different way and require the arriving data to be processed and/or persisted differently. Building a separate flow of data from the external source for each application is wasteful of resources as the pre-processing or transformations required by each application might overlap and could be done together in an incremental fashion to avoid redundancy. A single flow of data from the external source could provide data for multiple applications. To achieve this, we introduce the notion of primary and secondary feeds in AsterixDB.</p>
-<p>A feed in AsterixDB is considered to be a primary feed if it gets its data from an external data source. The objects contained in a feed (subsequent to any pre-processing) are directed to a designated AsterixDB dataset. Alternatively or additionally, these objects can be used to derive other feeds known as secondary feeds. A secondary feed is similar to its parent feed in every other aspect; it can have an associated UDF to allow for any subsequent processing, can be persisted into a dataset, and/or can be made to derive other secondary feeds to form a cascade network. A primary feed and a dependent secondary feed form a hierarchy. As an example, we next show an example AQL statement that redefines the previous feed &#x201c;ProcessedTwitterFeed&#x201d; in terms of their respective parent feed (TwitterFeed).</p>
+<p>You can check the annotated Tweets by querying the <tt>ProcessedTweets</tt> dataset:</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
-
-    drop feed ProcessedTwitterFeed if exists;
-
-    create secondary feed ProcessedTwitterFeed from feed TwitterFeed
-    apply function testlib#addHashTags;
+<pre class="source">    SELECT * FROM ProcessedTweets LIMIT 10;
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="A_quick_look_of_the_UDF_configuration"></a><a name="udfConfiguration">A quick look of the UDF configuration</a></h2>
+<p>AsterixDB uses an XML configuration file to describe the UDFs. A user can use it to define and reuse their compiled UDFs for different purposes. Here is a snippet of the configuration used in our <a href="#UDFOnFeeds">previous example</a>:</p>
 
-    connect feed ProcessedTwitterFeed to dataset ProcessedTweets;
+<div>
+<div>
+<pre class="source">    &lt;libraryFunction&gt;
+      &lt;name&gt;addMentionedUsers&lt;/name&gt;
+      &lt;function_type&gt;SCALAR&lt;/function_type&gt;
+      &lt;argument_type&gt;TweetType&lt;/argument_type&gt;
+      &lt;return_type&gt;TweetType&lt;/return_type&gt;
+      &lt;definition&gt;org.apache.asterix.external.library.AddMentionedUsersFactory&lt;/definition&gt;
+      &lt;parameters&gt;text&lt;/parameters&gt;
+    &lt;/libraryFunction&gt;
 </pre></div></div>
 
-<p>The <tt>addHashTags</tt> function is already provided in the example UDF.To see what objects are being inserted into the dataset, we can perform a simple dataset scan after allowing a few moments for the feed to start ingesting data:</p>
+<p>Here are the explanations of the fields in the configuration file:</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
-
-    for $i in dataset ProcessedTweets limit 10 return $i;
+<pre class="source">   name: The proper name that is used for invoke the function.
+   function_type: The type of the function.
+   argument_type: The datatype of the arguments passed in. If there is more than one parameter, separate them with comma(s), e.g., `AINT32,AINT32`.
+   return_type: The datatype of the returning value.
+   definition: A reference to the function factory.
+   parameters: The parameters passed into the function.
 </pre></div></div>
 
-<p>For an example of how to write a Java UDF from scratch, the source for the example UDF that has been used in this tutorial is available [here] (<a class="externalLink" href="https://github.com/apache/asterixdb/tree/master/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library">https://github.com/apache/asterixdb/tree/master/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library</a>)</p></div></div></div>
+<p>In our feeds example, we passed in <tt>&quot;text&quot;</tt> as a parameter to the function so it knows which field to look at to get the Tweet text. If the Twitter API were to change its field names in the future, we can accommodate that change by simply modifying the configuration file instead of recompiling the whole UDF package. This feature can be further utilized in use cases where a user has a Machine Learning algorithm with different trained model files. If you are interested, You can find more examples <a class="externalLink" href="https://github.com/apache/asterixdb/tree/master/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library">here</a></p></div>
 <div class="section">
-<h2><a name="Unstalling_an_AsterixDB_Library"></a><a name="installingUDF">Unstalling an AsterixDB Library</a></h2>
-<p>To uninstall a library, use the Managix uninstall command as follows:</p>
+<h2><a name="Unstalling_an_UDF_Library"></a><a name="uninstall">Unstalling an UDF Library</a></h2>
+<p>If you want to uninstall the UDF library, put AsterixDB into <tt>INACTVIVE</tt> mode and run following command:</p>
 
 <div>
 <div>
-<pre class="source">    $ managix stop -n my_asterix
-
-    $ managix uninstall -n my_asterix -d feeds -l testlib
+<pre class="source">    $ bin/udf.sh -m u -d DATAVERSE_NAME -l LIBRARY_NAME
 </pre></div></div></div>
         </div>
       </div>


[05/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/feeds/tutorial.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/feeds/tutorial.html b/docs/0.9.4/feeds/tutorial.html
deleted file mode 100644
index d870a25..0000000
--- a/docs/0.9.4/feeds/tutorial.html
+++ /dev/null
@@ -1,450 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/feeds/tutorial.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Support for Data Ingestion in AsterixDB</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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>Support for Data Ingestion in AsterixDB</h1>
-<div class="section">
-<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
-<ul>
-
-<li><a href="#Introduction">Introduction</a></li>
-<li><a href="#FeedAdapters">Feed Adapters</a></li>
-</ul><!-- * [Feed Policies](#FeedPolicies) -->
-</div>
-<div class="section">
-<h2><a name="Introduction">Introduction</a></h2>
-<p>In this document, we describe the support for data ingestion in AsterixDB. Data feeds are a new mechanism for having continuous data arrive into a BDMS from external sources and incrementally populate a persisted dataset and associated indexes. We add a new BDMS architectural component, called a data feed, that makes a Big Data system the caretaker for functionality that used to live outside, and we show how it improves users&#x2019; lives and system performance.</p></div>
-<div class="section">
-<h2><a name="Feed_Adapters"></a><a name="FeedAdapters">Feed Adapters</a></h2>
-<p>The functionality of establishing a connection with a data source and receiving, parsing and translating its data into ADM objects (for storage inside AsterixDB) is contained in a feed adapter. A feed adapter is an implementation of an interface and its details are specific to a given data source. An adapter may optionally be given parameters to configure its runtime behavior. Depending upon the data transfer protocol/APIs offered by the data source, a feed adapter may operate in a push or a pull mode. Push mode involves just one initial request by the adapter to the data source for setting up the connection. Once a connection is authorized, the data source &#x201c;pushes&#x201d; data to the adapter without any subsequent requests by the adapter. In contrast, when operating in a pull mode, the adapter makes a separate request each time to receive data. AsterixDB currently provides built-in adapters for several popular data sources such as Twitter and RSS feeds. AsterixDB addition
 ally provides a generic socket-based adapter that can be used to ingest data that is directed at a prescribed socket.</p>
-<p>In this tutorial, we shall describe building two example data ingestion pipelines that cover the popular scenarios of ingesting data from (a) Twitter (b) RSS  (c) Socket Feed source.</p>
-<div class="section">
-<div class="section">
-<h4><a name="Ingesting_Twitter_Stream"></a>Ingesting Twitter Stream</h4>
-<p>We shall use the built-in push-based Twitter adapter. As a pre-requisite, we must define a Tweet using the AsterixDB Data Model (ADM) and the AsterixDB Query Language (AQL). Given below are the type definitions in AQL that create a Tweet datatype which is representative of a real tweet as obtained from Twitter.</p>
-
-<div>
-<div>
-<pre class="source">    create dataverse feeds;
-    use dataverse feeds;
-
-    create type TwitterUser as closed {
-        screen_name: string,
-        lang: string,
-        friends_count: int32,
-        statuses_count: int32
-    };
-
-    create type Tweet as open {
-        id: int64,
-        user: TwitterUser
-    }
-
-    create dataset Tweets (Tweet)
-    primary key id;
-</pre></div></div>
-
-<p>We also create a dataset that we shall use to persist the tweets in AsterixDB. Next we make use of the <tt>create feed</tt> AQL statement to define our example data feed.</p>
-<div class="section">
-<h5><a name="Using_the_.E2.80.9Cpush_twitter.E2.80.9D_feed_adapter"></a>Using the &#x201c;push_twitter&#x201d; feed adapter</h5>
-<p>The &#x201c;push_twitter&#x201d; adapter requires setting up an application account with Twitter. To retrieve tweets, Twitter requires registering an application. Registration involves providing a name and a brief description for the application. Each application has associated OAuth authentication credentials that include OAuth keys and tokens. Accessing the Twitter API requires providing the following. 1. Consumer Key (API Key) 2. Consumer Secret (API Secret) 3. Access Token 4. Access Token Secret</p>
-<p>The &#x201c;push_twitter&#x201d; adapter takes as configuration the above mentioned parameters. End users are required to obtain the above authentication credentials prior to using the &#x201c;push_twitter&#x201d; adapter. For further information on obtaining OAuth keys and tokens and registering an application with Twitter, please visit <a class="externalLink" href="http://apps.twitter.com">http://apps.twitter.com</a></p>
-<p>Given below is an example AQL statement that creates a feed called &#x201c;TwitterFeed&#x201d; by using the &#x201c;push_twitter&#x201d; adapter.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
-    ((&quot;type-name&quot;=&quot;Tweet&quot;),
-     (&quot;format&quot;=&quot;twitter-status&quot;),
-     (&quot;consumer.key&quot;=&quot;************&quot;),
-     (&quot;consumer.secret&quot;=&quot;**************&quot;),
-     (&quot;access.token&quot;=&quot;**********&quot;),
-     (&quot;access.token.secret&quot;=&quot;*************&quot;));
-</pre></div></div>
-
-<p>It is required that the above authentication parameters are provided valid. Note that the <tt>create feed</tt> statement does not initiate the flow of data from Twitter into the AsterixDB instance. Instead, the <tt>create feed</tt> statement only results in registering the feed with the instance. The flow of data along a feed is initiated when it is connected to a target dataset using the connect feed statement and activated using the start feed statement.</p>
-<p>The Twitter adapter also supports several Twitter streaming APIs as follow:</p>
-<ol style="list-style-type: decimal">
-
-<li>Track filter (&#x201c;keywords&#x201d;=&#x201c;AsterixDB, Apache&#x201d;)</li>
-<li>Locations filter (&#x201c;locations&#x201d;=&#x201c;-29.7, 79.2, 36.7, 72.0; -124.848974,-66.885444, 24.396308, 49.384358&#x201d;)</li>
-<li>Language filter (&#x201c;language&#x201d;=&#x201c;en&#x201d;)</li>
-<li>Filter level (&#x201c;filter-level&#x201d;=&#x201c;low&#x201d;)</li>
-</ol>
-<p>An example of Twitter adapter tracking tweets with keyword &#x201c;news&#x201d; can be described using following ddl:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
-    ((&quot;type-name&quot;=&quot;Tweet&quot;),
-     (&quot;format&quot;=&quot;twitter-status&quot;),
-     (&quot;consumer.key&quot;=&quot;************&quot;),
-     (&quot;consumer.secret&quot;=&quot;**************&quot;),
-     (&quot;access.token&quot;=&quot;**********&quot;),
-     (&quot;access.token.secret&quot;=&quot;*************&quot;),
-     (&quot;keywords&quot;=&quot;news&quot;));
-</pre></div></div>
-
-<p>For more details about these APIs, please visit <a class="externalLink" href="https://dev.twitter.com/streaming/overview/request-parameters">https://dev.twitter.com/streaming/overview/request-parameters</a></p></div></div>
-<div class="section">
-<h4><a name="Lifecycle_of_a_Feed"></a>Lifecycle of a Feed</h4>
-<p>A feed is a logical artifact that is brought to life (i.e., its data flow is initiated) only when it is activated using the <tt>start feed</tt> statement. Before we active a feed, we need to designate the dataset where the data to be persisted using <tt>connect feed</tt> statement. Subsequent to a <tt>connect feed</tt> statement, the feed is said to be in the connected state. After that, <tt>start feed</tt> statement will activate the feed, and start the dataflow from feed to its connected dataset. Multiple feeds can simultaneously be connected to a dataset such that the contents of the dataset represent the union of the connected feeds. Also one feed can be simultaneously connected to multiple target datasets.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    connect feed TwitterFeed to dataset Tweets;
-
-    start feed TwitterFeed;
-</pre></div></div>
-
-<p>The <tt>connect feed</tt> statement above directs AsterixDB to persist the data from <tt>TwitterFeed</tt> feed into the <tt>Tweets</tt> dataset. The <tt>start feed</tt> statement will activate the feed and start the dataflow. If it is required (by the high-level application) to also retain the raw tweets obtained from Twitter, the end user may additionally choose to connect TwitterFeed to a different dataset.</p>
-<p>Let the feed run for a minute, then run the following query to see the latest tweets that are stored into the data set.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    for $i in dataset Tweets limit 10 return $i;
-</pre></div></div>
-
-<p>The dataflow of data from a feed can be terminated explicitly by <tt>stop feed</tt> statement.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    stop feed TwitterFeed;
-</pre></div></div>
-
-<p>The <tt>disconnnect statement</tt> can be used to disconnect the feed from certain dataset.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    disconnect feed TwitterFeed from dataset Tweets;
-</pre></div></div>
-</div></div>
-<div class="section">
-<h3><a name="Ingesting_with_Other_Adapters"></a>Ingesting with Other Adapters</h3>
-<p>AsterixDB has several builtin feed adapters for data ingestion. User can also implement their own adapters and plug them into AsterixDB. Here we introduce <tt>rss_feed</tt>, <tt>socket_adapter</tt> and <tt>localfs</tt> feed adapter that cover most of the common application scenarios.</p>
-<div class="section">
-<div class="section">
-<h5><a name="Using_the_.E2.80.9Crss_feed.E2.80.9D_feed_adapter"></a>Using the &#x201c;rss_feed&#x201d; feed adapter</h5>
-<p><tt>rss_feed</tt> adapter allows retrieving data given a collection of RSS end point URLs. As observed in the case of ingesting tweets, it is required to model an RSS data item using AQL.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create type Rss if not exists as open {
-        id: string,
-        title: string,
-        description: string,
-        link: string
-    };
-
-    create dataset RssDataset (Rss)
-    primary key id;
-</pre></div></div>
-
-<p>Next, we define an RSS feed using our built-in adapter &#x201c;rss_feed&#x201d;.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create feed my_feed using
-    rss_feed (
-       (&quot;type-name&quot;=&quot;Rss&quot;),
-       (&quot;format&quot;=&quot;rss&quot;),
-       (&quot;url&quot;=&quot;http://rss.cnn.com/rss/edition.rss&quot;)
-    );
-</pre></div></div>
-
-<p>In the above definition, the configuration parameter &#x201c;url&#x201d; can be a comma-separated list that reflects a collection of RSS URLs, where each URL corresponds to an RSS endpoint or an RSS feed. The &#x201c;rss_feed&#x201d; retrieves data from each of the specified RSS URLs (comma separated values) in parallel.</p>
-<p>The following statements connect the feed into the <tt>RssDataset</tt>:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    connect feed my_feed to dataset RssDataset;
-</pre></div></div>
-
-<p>The following statements activate the feed and start the dataflow:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    start feed my_feed;
-</pre></div></div>
-
-<p>The following statements show the latest data from the data set, stop the feed, and disconnect the feed from the data set.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    for $i in dataset RssDataset limit 10 return $i;
-
-    stop feed my_feed
-
-    disconnect feed my_feed from dataset RssDataset;
-</pre></div></div>
-</div>
-<div class="section">
-<h5><a name="Using_the_.E2.80.9Csocket_adapter.E2.80.9D_feed_adapter"></a>Using the &#x201c;socket_adapter&#x201d; feed adapter</h5>
-<p><tt>socket_adapter</tt> feed opens a web socket on the given node which allows user to push data into AsterixDB directly. Here is an example:</p>
-
-<div>
-<div>
-<pre class="source">    drop dataverse feeds if exists;
-    create dataverse feeds;
-    use dataverse feeds;
-
-    create type TestDataType as open {
-       screenName: string
-    }
-
-    create dataset TestDataset(TestDataType) primary key screenName;
-
-    create feed TestSocketFeed using socket_adapter
-    (
-       (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
-       (&quot;address-type&quot;=&quot;IP&quot;),
-       (&quot;type-name&quot;=&quot;TestDataType&quot;),
-       (&quot;format&quot;=&quot;adm&quot;)
-    );
-
-    connect feed TestSocketFeed to dataset TestDataset;
-
-    use dataverse feeds;
-    start feed TestSocketFeed;
-</pre></div></div>
-
-<p>The above statements create a socket feed which is listening to &#x201c;10001&#x201d; port of the host machine. This feed accepts data records in &#x201c;adm&#x201d; format. As an example, you can download the sample dataset <a href="../data/chu.adm">Chirp Users</a> and push them line by line into the socket feed using any socket client you like. Following is a socket client example in Python:</p>
-
-<div>
-<div>
-<pre class="source">    from socket import socket
-
-    ip = '127.0.0.1'
-    port1 = 10001
-    filePath = 'chu.adm'
-
-    sock1 = socket()
-    sock1.connect((ip, port1))
-
-    with open(filePath) as inputData:
-        for line in inputData:
-            sock1.sendall(line)
-        sock1.close()
-</pre></div></div>
-</div></div>
-<div class="section">
-<h4><a name="Using_the_.E2.80.9Clocalfs.E2.80.9D_feed_adapter"></a>Using the &#x201c;localfs&#x201d; feed adapter</h4>
-<p><tt>localfs</tt> adapter enables data ingestion from local file system. It allows user to feed data records on local disk into a dataset. A DDL example for creating a <tt>localfs</tt> feed is given as follow:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create type TweetType as closed {
-      id: string,
-      username : string,
-      location : string,
-      text : string,
-      timestamp : string
-    }
-
-    create dataset Tweets(TweetType)
-    primary key id;
-
-    create feed TweetFeed
-    using localfs
-    ((&quot;type-name&quot;=&quot;TweetType&quot;),(&quot;path&quot;=&quot;HOSTNAME://LOCAL_FILE_PATH&quot;),(&quot;format&quot;=&quot;adm&quot;))
-</pre></div></div>
-
-<p>Similar to previous examples, we need to define the datatype and dataset this feed uses. The &#x201c;path&#x201d; parameter refers to the local datafile that we want to ingest data from. <tt>HOSTNAME</tt> can either be the IP address or node name of the machine which holds the file. <tt>LOCAL_FILE_PATH</tt> indicates the absolute path to the file on that machine. Similarly to <tt>socket_adapter</tt>, this feed takes <tt>adm</tt> formatted data records.</p></div></div>
-<div class="section">
-<h3><a name="Datatype_for_feed_and_target_dataset"></a>Datatype for feed and target dataset</h3>
-<p>The &#x201c;type-name&#x201d; parameter in create feed statement defines the <tt>datatype</tt> of the datasource. In most use cases, feed will have the same <tt>datatype</tt> as the target dataset. However, if we want to perform certain preprocess before the data records gets into the target dataset (append autogenerated key, apply user defined functions, etc.), we will need to define the datatypes for feed and dataset separately.</p>
-<div class="section">
-<h4><a name="Ingestion_with_autogenerated_key"></a>Ingestion with autogenerated key</h4>
-<p>AsterixDB supports using autogenerated uuid as the primary key for dataset. When we use this feature, we will need to define a datatype with the primary key field, and specify that field to be autogenerated when creating the dataset. Use that same datatype in feed definition will cause a type discrepancy since there is no such field in the datasource. Thus, we will need to define two separate datatypes for feed and dataset:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create type DBLPFeedType as closed {
-      dblpid: string,
-      title: string,
-      authors: string,
-      misc: string
-    }
-
-    create type DBLPDataSetType as open {
-      id: uuid,
-      dblpid: string,
-      title: string,
-      authors: string,
-      misc: string
-    }
-    create dataset DBLPDataset(DBLPDataSetType) primary key id autogenerated;
-
-    create feed DBLPFeed using socket_adapter
-    (
-        (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
-        (&quot;address-type&quot;=&quot;IP&quot;),
-        (&quot;type-name&quot;=&quot;DBLPFeedType&quot;),
-        (&quot;format&quot;=&quot;adm&quot;)
-    );
-
-    connect feed DBLPFeed to dataset DBLPDataset;
-
-    start feed DBLPFeed;
-</pre></div></div>
-</div></div></div>
-<div class="section">
-<h2><a name="Policies_for_Feed_Ingestion"></a><a name="FeedPolicies">Policies for Feed Ingestion</a></h2>
-<p>Multiple feeds may be concurrently operational on an AsterixDB cluster, each competing for resources (CPU cycles, network bandwidth, disk IO) to maintain pace with their respective data sources. As a data management system, AsterixDB is able to manage a set of concurrent feeds and make dynamic decisions related to the allocation of resources, resolving resource bottlenecks and the handling of failures. Each feed has its own set of constraints, influenced largely by the nature of its data source and the applications that intend to consume and process the ingested data. Consider an application that intends to discover the trending topics on Twitter by analyzing tweets that are being processed. Losing a few tweets may be acceptable. In contrast, when ingesting from a data source that provides a click-stream of ad clicks, losing data would translate to a loss of revenue for an application that tracks revenue by charging advertisers per click.</p>
-<p>AsterixDB allows a data feed to have an associated ingestion policy that is expressed as a collection of parameters and associated values. An ingestion policy dictates the runtime behavior of the feed in response to resource bottlenecks and failures. AsterixDB provides a set of policies that help customize the system&#x2019;s runtime behavior when handling excess objects.</p>
-<div class="section">
-<div class="section">
-<h4><a name="Policies"></a>Policies</h4>
-<ul>
-
-<li>
-
-<p><i>Spill</i>: Objects that cannot be processed by an operator for lack of resources (referred to as excess objects hereafter) should be persisted to the local disk for deferred processing.</p>
-</li>
-<li>
-
-<p><i>Discard</i>: Excess objects should be discarded.</p>
-</li>
-</ul>
-<p>Note that the end user may choose to form a custom policy.  For example, it is possible in AsterixDB to create a custom policy that spills excess objects to disk and subsequently resorts to throttling if the spillage crosses a configured threshold. In all cases, the desired ingestion policy is specified as part of the <tt>connect feed</tt> statement or else the &#x201c;Basic&#x201d; policy will be chosen as the default.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    connect feed TwitterFeed to dataset Tweets
-    using policy Basic;
-</pre></div></div></div></div></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/index.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/index.html b/docs/0.9.4/index.html
index c60841f..02923b1 100644
--- a/docs/0.9.4/index.html
+++ b/docs/0.9.4/index.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/index.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/index.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/ncservice.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/ncservice.html b/docs/0.9.4/ncservice.html
index f65561d..dd36797 100644
--- a/docs/0.9.4/ncservice.html
+++ b/docs/0.9.4/ncservice.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/ncservice.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/ncservice.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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181012" />
     <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Table of Contents</title>
+    <title>AsterixDB &#x2013; Installation using NCService</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" />
@@ -26,7 +26,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
+        <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>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">
@@ -90,6 +90,7 @@
  ! specific language governing permissions and limitations
  ! under the License.
  !-->
+<h1>Installation using NCService</h1>
 <div class="section">
 <h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
 <ul>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/overview.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/overview.html b/docs/0.9.4/overview.html
index 4f087c8..ba0ef11 100644
--- a/docs/0.9.4/overview.html
+++ b/docs/0.9.4/overview.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/overview.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/overview.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB: A Big Data Management System</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">


[08/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/builtins.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/builtins.html b/docs/0.9.4/aql/builtins.html
new file mode 100644
index 0000000..43116f4
--- /dev/null
+++ b/docs/0.9.4/aql/builtins.html
@@ -0,0 +1,8927 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/aql/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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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_radius</h3>
+<ul>
+
+<li>
+
+<p>Syntax:</p>
+
+<div>
+<d

<TRUNCATED>

[14/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/csv.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/csv.html b/content/docs/0.9.4/csv.html
index 036c1ef..02a9830 100644
--- a/content/docs/0.9.4/csv.html
+++ b/content/docs/0.9.4/csv.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/csv.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/csv.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; CSV Support in AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><span class="none"></span>CSV Output</a></li>
       <li class="nav-header">Advanced Features</li>
-    <li><a href="aql/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/datamodel.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/datamodel.html b/content/docs/0.9.4/datamodel.html
new file mode 100644
index 0000000..4682c66
--- /dev/null
+++ b/content/docs/0.9.4/datamodel.html
@@ -0,0 +1,778 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/datamodel.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; The Asterix Data Model (ADM)</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 class="active"><a href="#"><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><a href="sqlpp/builtins.html" title="Builtin Functions"><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>The Asterix Data Model (ADM)</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="#PrimitiveTypes">Primitive Types</a>
+<ul>
+
+<li><a href="#PrimitiveTypesBoolean">Boolean</a></li>
+<li><a href="#PrimitiveTypesString">String</a></li>
+<li><a href="#PrimitiveTypesInt">Tinyint / Smallint / Integer (Int) / Bigint</a></li>
+<li><a href="#PrimitiveTypesFloat">Float</a></li>
+<li><a href="#PrimitiveTypesDouble">Double (Double Precision)</a></li>
+<li><a href="#PrimitiveTypesBinary">Binary</a></li>
+<li><a href="#PrimitiveTypesPoint">Point</a></li>
+<li><a href="#PrimitiveTypesLine">Line</a></li>
+<li><a href="#PrimitiveTypesRectangle">Rectangle</a></li>
+<li><a href="#PrimitiveTypesCircle">Circle</a></li>
+<li><a href="#PrimitiveTypesPolygon">Polygon</a></li>
+<li><a href="#PrimitiveTypesDate">Date</a></li>
+<li><a href="#PrimitiveTypesTime">Time</a></li>
+<li><a href="#PrimitiveTypesDateTime">Datetime (Timestamp)</a></li>
+<li><a href="#PrimitiveTypesDuration">Duration/Year_month_duration/Day_time_duration</a></li>
+<li><a href="#PrimitiveTypesInterval">Interval</a></li>
+<li><a href="#PrimitiveTypesUUID">UUID</a></li>
+</ul>
+</li>
+<li>[Incomplete Information Types] (#IncompleteInformationTypes)
+<ul>
+
+<li><a href="#IncompleteInformationTypesNull">Null</a></li>
+<li><a href="#IncompleteInformationTypesMissing">Missing</a></li>
+</ul>
+</li>
+<li><a href="#DerivedTypes">Derived Types</a>
+<ul>
+
+<li><a href="#DerivedTypesObject">Object</a></li>
+<li><a href="#DerivedTypesArray">Array</a></li>
+<li><a href="#DerivedTypesMultiset">Multiset</a></li>
+</ul>
+</li>
+</ul>
+<p>An instance of Asterix data model (ADM) can be a <i><i>primitive type</i></i> (<tt>boolean</tt>, <tt>tinyint</tt>, <tt>smallint</tt>, <tt>integer</tt>, <tt>bigint</tt>, <tt>string</tt>, <tt>float</tt>, <tt>double</tt>, <tt>date</tt>, <tt>time</tt>, <tt>datetime</tt>, etc.), a <i><i>special type</i></i> (<tt>null</tt> or <tt>missing</tt>), or a <i><i>derived type</i></i>.</p>
+<p>The type names are case-insensitive, e.g., both <tt>BIGINT</tt> and <tt>bigint</tt> are acceptable.</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="Primitive_Types"></a><a name="PrimitiveTypes" id="PrimitiveTypes">Primitive Types</a></h2>
+<div class="section">
+<h3><a name="Boolean"></a><a name="PrimitiveTypesBoolean" id="PrimitiveTypesBoolean">Boolean</a></h3>
+<p><tt>boolean</tt> data type can have one of the two values: <i><i>true</i></i> or <i><i>false</i></i>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;true&quot;: true, &quot;false&quot;: false };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;true&quot;: true, &quot;false&quot;: false }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="String"></a><a name="PrimitiveTypesString" id="PrimitiveTypesString">String</a></h3>
+<p><tt>string</tt> represents a sequence of characters. The total length of the sequence can be up to 2,147,483,648.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: string(&quot;This is a string.&quot;), &quot;v2&quot;: string(&quot;\&quot;This is a quoted string\&quot;&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;This is a string.&quot;, &quot;v2&quot;: &quot;\&quot;This is a quoted string\&quot;&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="Tinyint_.2F_Smallint_.2F_Integer_.28Int.29_.2F_Bigint"></a><a name="PrimitiveTypesInt" id="PrimitiveTypesInt">Tinyint / Smallint / Integer (Int) / Bigint</a></h3>
+<p>Integer types using 8, 16, 32, or 64 bits. The ranges of these types are:</p>
+<ul>
+
+<li><tt>tinyint</tt>: -128 to 127</li>
+<li><tt>smallint</tt>: -32768 to 32767</li>
+<li><tt>integer</tt>: -2147483648 to 2147483647</li>
+<li><tt>bigint</tt>: -9223372036854775808 to 9223372036854775807</li>
+</ul>
+<p><tt>int</tt> is an abbreviated alias for integer.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;tinyint&quot;: tiny(&quot;125&quot;), &quot;smallint&quot;: smallint(&quot;32765&quot;), &quot;integer&quot;: 294967295, &quot;bigint&quot;: bigint(&quot;1700000000000000000&quot;)};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;tinyint&quot;: 125, &quot;smallint&quot;: 32765, &quot;integer&quot;: 294967295, &quot;bigint&quot;: 1700000000000000000 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Float"></a><a name="PrimitiveTypesFloat" id="PrimitiveTypesFloat">Float</a></h3>
+<p><tt>float</tt> represents approximate numeric data values using 4 bytes. The range of a float value can be from 2^(-149) to (2-2^(-23)&#xb7;2^(127) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: float(&quot;NaN&quot;), &quot;v2&quot;: float(&quot;INF&quot;), &quot;v3&quot;: float(&quot;-INF&quot;), &quot;v4&quot;: float(&quot;-2013.5&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;NaN&quot;, &quot;v2&quot;: &quot;INF&quot;, &quot;v3&quot;: &quot;-INF&quot;, &quot;v4&quot;: -2013.5 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Double_.28double_precision.29"></a><a name="PrimitiveTypesDouble" id="PrimitiveTypesDouble">Double (double precision)</a></h3>
+<p><tt>double</tt> represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))&#xb7;2^(1023) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: double(&quot;NaN&quot;), &quot;v2&quot;: double(&quot;INF&quot;), &quot;v3&quot;: double(&quot;-INF&quot;), &quot;v4&quot;: &quot;-2013.593823748327284&quot; };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;NaN&quot;, &quot;v2&quot;: &quot;INF&quot;, &quot;v3&quot;: &quot;-INF&quot;, &quot;v4&quot;: -2013.5938237483274 }
+</pre></div></div>
+</li>
+</ul>
+<p><tt>Double precision</tt> is an alias of <tt>double</tt>.</p></div>
+<div class="section">
+<h3><a name="Binary"></a><a name="PrimitiveTypesBinary" id="PrimitiveTypesBinary">Binary</a></h3>
+<p><tt>binary</tt> represents a sequence of bytes. It can be constructed from a <tt>hex</tt> or a <tt>base64</tt> string sequence. The total length of the byte sequence can be up to 2,147,483,648.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;hex1&quot; : hex(&quot;ABCDEF0123456789&quot;),
+  &quot;hex2&quot;: hex(&quot;abcdef0123456789&quot;),
+  &quot;base64_1&quot; : base64(&quot;0123456789qwertyui+/&quot;),
+  &quot;base64_2&quot; : base64('QXN0ZXJpeA==')
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The default output format is in <tt>hex</tt> format. Thus, the expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;hex1&quot;: hex(&quot;ABCDEF0123456789&quot;),
+  &quot;hex2&quot;: hex(&quot;ABCDEF0123456789&quot;),
+  &quot;base64_1&quot;: hex(&quot;D35DB7E39EBBF3DAB07ABB72BA2FBF&quot;),
+  &quot;base64_2&quot;: hex(&quot;41737465726978&quot;)
+}
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Point"></a><a name="PrimitiveTypesPoint" id="PrimitiveTypesPoint">Point</a></h3>
+<p><tt>point</tt> is the fundamental two-dimensional building block for spatial types. It consists of two <tt>double</tt> coordinates x and y.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: point(&quot;80.10d, -10E5&quot;), &quot;v2&quot;: point(&quot;5.10E-10d, -10E5&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: point(&quot;80.1,-1000000.0&quot;), &quot;v2&quot;: point(&quot;5.1E-10,-1000000.0&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Line"></a><a name="PrimitiveTypesLine" id="PrimitiveTypesLine">Line</a></h3>
+<p><tt>line</tt> consists of two points that represent the start and the end points of a line segment.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: line(&quot;10.1234,11.1e-1 +10.2E-2,-11.22&quot;), &quot;v2&quot;: line(&quot;0.1234,-1.00e-10 +10.5E-2,-01.02&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: line(&quot;10.1234,1.11 0.102,-11.22&quot;), &quot;v2&quot;: line(&quot;0.1234,-1.0E-10 0.105,-1.02&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Rectangle"></a><a name="PrimitiveTypesRectangle" id="PrimitiveTypesRectangle">Rectangle</a></h3>
+<p><tt>rectangle</tt> consists of two points that represent the <i><i>bottom left</i></i> and <i><i>upper right</i></i> corners of a rectangle.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: rectangle(&quot;5.1,11.8 87.6,15.6548&quot;), &quot;v2&quot;: rectangle(&quot;0.1234,-1.00e-10 5.5487,0.48765&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: rectangle(&quot;5.1,11.8 87.6,15.6548&quot;), &quot;v2&quot;: rectangle(&quot;0.1234,-1.0E-10 5.5487,0.48765&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Circle"></a><a name="PrimitiveTypesCircle" id="PrimitiveTypesCircle">Circle</a></h3>
+<p><tt>circle</tt> consists of one point that represents the center of the circle and a radius of type <tt>double</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: circle(&quot;10.1234,11.1e-1 +10.2E-2&quot;), &quot;v2&quot;: circle(&quot;0.1234,-1.00e-10 +10.5E-2&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: circle(&quot;10.1234,1.11 0.102&quot;), &quot;v2&quot;: circle(&quot;0.1234,-1.0E-10 0.105&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Polygon"></a><a name="PrimitiveTypesPolygon" id="PrimitiveTypesPolygon">Polygon</a></h3>
+<p><tt>polygon</tt> consists of <i><i>n</i></i> points that represent the vertices of a <i><i>simple closed</i></i> polygon.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: polygon(&quot;-1.2,+1.3e2 -2.14E+5,2.15 -3.5e+2,03.6 -4.6E-3,+4.81&quot;),
+  &quot;v2&quot;: polygon(&quot;-1.0,+10.5e2 -02.15E+50,2.5 -1.0,+3.3e3 -2.50E+05,20.15 +3.5e+2,03.6 -4.60E-3,+4.75 -2,+1.0e2 -2.00E+5,20.10 30.5,03.25 -4.33E-3,+4.75&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: polygon(&quot;-1.2,130.0 -214000.0,2.15 -350.0,3.6 -0.0046,4.81&quot;),
+  &quot;v2&quot;: polygon(&quot;-1.0,1050.0 -2.15E50,2.5 -1.0,3300.0 -250000.0,20.15 350.0,3.6 -0.0046,4.75 -2.0,100.0 -200000.0,20.1 30.5,3.25 -0.00433,4.75&quot;) }
+}
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Date"></a><a name="PrimitiveTypesDate" id="PrimitiveTypesDate">Date</a></h3>
+<p><tt>date</tt> represents a time point along the Gregorian calendar system specified by the year, month and day. ASTERIX supports the date from <tt>-9999-01-01</tt> to <tt>9999-12-31</tt>.</p>
+<p>A date value can be represented in two formats, extended format and basic format.</p>
+<ul>
+
+<li>Extended format is represented as <tt>[-]yyyy-mm-dd</tt> for <tt>year-month-day</tt>. Each field should be padded if there are less digits than the format specified.</li>
+<li>Basic format is in the format of <tt>[-]yyyymmdd</tt>.</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: date(&quot;2013-01-01&quot;), &quot;v2&quot;: date(&quot;-19700101&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: date(&quot;2013-01-01&quot;), &quot;v2&quot;: date(&quot;-1970-01-01&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Time"></a><a name="PrimitiveTypesTime" id="PrimitiveTypesTime">Time</a></h3>
+<p><tt>time</tt> type describes the time within the range of a day. It is represented by three fields: hour, minute and second. Millisecond field is optional as the fraction of the second field. Its extended format is as <tt>hh:mm:ss[.mmm]</tt> and the basic format is <tt>hhmmss[mmm]</tt>. The value domain is from <tt>00:00:00.000</tt> to <tt>23:59:59.999</tt>.</p>
+<p>Timezone field is optional for a time value. Timezone is represented as <tt>[+|-]hh:mm</tt> for extended format or <tt>[+|-]hhmm</tt> for basic format. Note that the sign designators cannot be omitted. <tt>Z</tt> can also be used to represent the UTC local time. If no timezone information is given, it is UTC by default.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: time(&quot;12:12:12.039Z&quot;), &quot;v2&quot;: time(&quot;000000000-0800&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: time(&quot;12:12:12.039Z&quot;), &quot;v2&quot;: time(&quot;08:00:00.000Z&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Datetime_.28Timestamp.29"></a><a name="PrimitiveTypesDateTime" id="PrimitiveTypesDateTime">Datetime (Timestamp)</a></h3>
+<p>A <tt>datetime</tt> value is a combination of an <tt>date</tt> and <tt>time</tt>, representing a fixed time point along the Gregorian calendar system. The value is among <tt>-9999-01-01 00:00:00.000</tt> and <tt>9999-12-31 23:59:59.999</tt>.</p>
+<p>A <tt>datetime</tt> value is represented as a combination of the representation of its <tt>date</tt> part and <tt>time</tt> part, separated by a separator <tt>T</tt>. Either extended or basic format can be used, and the two parts should be the same format.</p>
+<p>Millisecond field and timezone field are optional, as specified in the <tt>time</tt> type.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: datetime(&quot;2013-01-01T12:12:12.039Z&quot;), &quot;v2&quot;: datetime(&quot;-19700101T000000000-0800&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: datetime(&quot;2013-01-01T12:12:12.039Z&quot;), &quot;v2&quot;: datetime(&quot;-1970-01-01T08:00:00.000Z&quot;) }
+</pre></div></div>
+</li>
+</ul>
+<p><tt>timestamp</tt> is an alias of <tt>datetime</tt>.</p></div>
+<div class="section">
+<h3><a name="Duration.2FYear_month_duration.2FDay_time_duration"></a><a name="PrimitiveTypesDuration" id="PrimitiveTypesDuration">Duration/Year_month_duration/Day_time_duration</a></h3>
+<p><tt>duration</tt> represents a duration of time. A duration value is specified by integers on at least one of the following fields: year, month, day, hour, minute, second, and millisecond.</p>
+<p>A duration value is in the format of <tt>[-]PnYnMnDTnHnMn.mmmS</tt>. The millisecond part (as the fraction of the second field) is optional, and when no millisecond field is used, the decimal point should also be absent.</p>
+<p>Negative durations are also supported for the arithmetic operations between time instance types (<tt>date</tt>, <tt>time</tt> and <tt>datetime</tt>), and is used to roll the time back for the given duration. For example <tt>date(&quot;2012-01-01&quot;) + duration(&quot;-P3D&quot;)</tt> will return <tt>date(&quot;2011-12-29&quot;)</tt>.</p>
+<p>There are also two sub-duration types, namely <tt>year_month_duration</tt> and <tt>day_time_duration</tt>. <tt>year_month_duration</tt> represents only the years and months of a duration, while <tt>day_time_duration</tt> represents only the day to millisecond fields. Different from the <tt>duration</tt> type, both these two subtypes are totally ordered, so they can be used for comparison and index construction.</p>
+<p>Note that a canonical representation of the duration is always returned, regardless whether the duration is in the canonical representation or not from the user&#x2019;s input. More information about canonical representation can be found from <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-dayTimeDuration">XPath dayTimeDuration Canonical Representation</a> and <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-yearMonthDuration">yearMonthDuration Canonical Representation</a>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: duration(&quot;P100Y12MT12M&quot;), &quot;v2&quot;: duration(&quot;-PT20.943S&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: duration(&quot;P101YT12M&quot;), &quot;v2&quot;: duration(&quot;-PT20.943S&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Interval"></a><a name="PrimitiveTypesInterval" id="PrimitiveTypesInterval">Interval</a></h3>
+<p><tt>interval</tt> represents inclusive-exclusive ranges of time. It is defined by two time point values with the same temporal type(<tt>date</tt>, <tt>time</tt> or <tt>datetime</tt>).</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: interval(date(&quot;2013-01-01&quot;), date(&quot;20130505&quot;)),
+  &quot;v2&quot;: interval(time(&quot;00:01:01&quot;), time(&quot;213901049+0800&quot;)),
+  &quot;v3&quot;: interval(datetime(&quot;2013-01-01T00:01:01&quot;), datetime(&quot;20130505T213901049+0800&quot;))
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: interval(date(&quot;2013-01-01&quot;), date(&quot;2013-05-05&quot;)),
+  &quot;v2&quot;: interval(time(&quot;00:01:01.000Z&quot;), time(&quot;13:39:01.049Z&quot;)),
+  &quot;v3&quot;: interval(datetime(&quot;2013-01-01T00:01:01.000Z&quot;), datetime(&quot;2013-05-05T13:39:01.049Z&quot;))
+}
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="UUID"></a><a name="PrimitiveTypesUUID" id="PrimitiveTypesUUID">UUID</a></h3>
+<p><tt>uuid</tt> represents a UUID value, which stands for Universally unique identifier. It is defined by a canonical format using hexadecimal text with inserted hyphen characters. (E.g.: 5a28ce1e-6a74-4201-9e8f-683256e5706f). This type is generally used to store auto-generated primary key values.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">return { &quot;v1&quot;:uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;) }
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&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="Incomplete_Information_Types"></a><a name="IncompleteInformationTypes" id="IncompleteInformationTypes">Incomplete Information Types</a></h2>
+<div class="section">
+<h3><a name="Null"></a><a name="IncompleteInformationTypesNull" id="IncompleteInformationTypesNull">Null</a></h3>
+<p><tt>null</tt> is a special value that is often used to represent an unknown value. For example, a user might not be able to know the value of a field and let it be <tt>null</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;field&quot;: null };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;field&quot;: null }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Missing"></a><a name="IncompleteInformationTypesMissing" id="IncompleteInformationTypesMissing">Missing</a></h3>
+<p><tt>missing</tt> indicates that a name-value pair is missing from an object. If a missing name-value pair is accessed, an empty result value is returned by the query.</p>
+<p>As neither the data model nor the system enforces homogeneity for datasets or collections, items in a dataset or collection can be of heterogeneous types and so a field can be present in one object and <tt>missing</tt> in another.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;field&quot;: missing };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{  }
+</pre></div></div>
+</li>
+</ul>
+<p>Since a field with value <tt>missing</tt> means the field is absent, we get an empty object.</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>
+<div class="section">
+<h2><a name="Derived_Types"></a><a name="DerivedTypes" id="DerivedTypes">Derived Types</a></h2>
+<div class="section">
+<h3><a name="Object"></a><a name="DerivedTypesObject" id="DerivedTypesObject">Object</a></h3>
+<p>An <tt>object</tt> contains a set of &#xfb01;elds, where each &#xfb01;eld is described by its name and type. An object type may be defined as either open or closed. Open objects (instances of open object types) are permitted to contain &#xfb01;elds that are not part of the type de&#xfb01;nition, while closed objects do not permit their instances to carry extra fields. An example type definition for an object is:</p>
+
+<div>
+<div>
+<pre class="source">    create type SoldierType as open {
+        name: string?,
+        rank: string,
+        serialno: int
+    };
+</pre></div></div>
+
+<p>Syntactically, object constructors are surrounded by curly braces &#x201c;{&#x2026;}&#x201d;. Some examples of legitimate instances of the above type include:</p>
+
+<div>
+<div>
+<pre class="source">    { &quot;name&quot;: &quot;Joe Blow&quot;, &quot;rank&quot;: &quot;Sergeant&quot;, &quot;serialno&quot;: 1234567 }
+    { &quot;rank&quot;: &quot;Private&quot;, &quot;serialno&quot;: 9876543 }
+    { &quot;name&quot;: &quot;Sally Forth&quot;, &quot;rank&quot;: &quot;Major&quot;, &quot;serialno&quot;: 2345678, &quot;gender&quot;: &quot;F&quot; }
+</pre></div></div>
+
+<p>The first instance has all of the type&#x2019;s prescribed content. The second instance is missing the name field, which is fine because it is optional (due to the ?). The third instance has an extra field; that is fine because the type definition specifies that it is open (which is also true by default, if open is not specified). To more tightly control object content, specifying closed instead of open in the type definition for SoldierType would have made the third example instance an invalid instance of the type.</p></div>
+<div class="section">
+<h3><a name="Array"></a><a name="DerivedTypesArray" id="DerivedTypesArray">Array</a></h3>
+<p>An <tt>array</tt> is a container that holds a fixed number of values. Array constructors are denoted by brackets: &#x201c;[&#x2026;]&#x201d;.</p>
+<p>An example would be</p>
+
+<div>
+<div>
+<pre class="source">    [&quot;alice&quot;, 123, &quot;bob&quot;, null]
+</pre></div></div>
+</div>
+<div class="section">
+<h3><a name="Multiset"></a><a name="DerivedTypesMultiset" id="DerivedTypesMultiset">Multiset</a></h3>
+<p>A <tt>multiset</tt> is a generalization of the concept of a set that, unlike a set, allows multiple instances of the multiset&#x2019;s elements. Multiset constructors are denoted by two opening curly braces followed by data and two closing curly braces, like &#x201c;{{&#x2026;}}&#x201d;.</p>
+<p>An example would be</p>
+
+<div>
+<div>
+<pre class="source">    {{&quot;hello&quot;, 9328, &quot;world&quot;, [1, 2, null]}}
+</pre></div></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/feeds.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/feeds.html b/content/docs/0.9.4/feeds.html
new file mode 100644
index 0000000..93086c1
--- /dev/null
+++ b/content/docs/0.9.4/feeds.html
@@ -0,0 +1,468 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/feeds.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; Data Ingestion with Feeds</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><a href="sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>Data Ingestion with Feeds</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+<ul>
+
+<li><a href="#Introduction">Introduction</a></li>
+<li><a href="#FeedAdapters">Feed Adapters</a></li>
+<li><a href="#FeedPolicies">Feed Policies</a><!--
+! 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.
+!--></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction">Introduction</a></h2>
+<p>In this document, we describe the support for data ingestion in AsterixDB. Data feeds are a new mechanism for having continuous data arrive into a BDMS from external sources and incrementally populate a persisted dataset and associated indexes. We add a new BDMS architectural component, called a data feed, that makes a Big Data system the caretaker for functionality that used to live outside, and we show how it improves users&#x2019; lives and system performance.</p></div>
+<div class="section">
+<h2><a name="Feed_Adapters"></a><a name="FeedAdapters">Feed Adapters</a></h2>
+<p>The functionality of establishing a connection with a data source and receiving, parsing and translating its data into ADM objects (for storage inside AsterixDB) is contained in a feed adapter. A feed adapter is an implementation of an interface and its details are specific to a given data source. An adapter may optionally be given parameters to configure its runtime behavior. Depending upon the data transfer protocol/APIs offered by the data source, a feed adapter may operate in a push or a pull mode. Push mode involves just one initial request by the adapter to the data source for setting up the connection. Once a connection is authorized, the data source &#x201c;pushes&#x201d; data to the adapter without any subsequent requests by the adapter. In contrast, when operating in a pull mode, the adapter makes a separate request each time to receive data. AsterixDB currently provides built-in adapters for several popular data sources such as Twitter and RSS feeds. AsterixDB addition
 ally provides a generic socket-based adapter that can be used to ingest data that is directed at a prescribed socket.</p>
+<p>In this tutorial, we shall describe building two example data ingestion pipelines that cover the popular scenarios of ingesting data from (a) Twitter (b) RSS  (c) Socket Feed source.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Ingesting_Twitter_Stream"></a>Ingesting Twitter Stream</h4>
+<p>We shall use the built-in push-based Twitter adapter. As a pre-requisite, we must define a Tweet using the AsterixDB Data Model (ADM) and the AsterixDB Query Language (AQL). Given below are the type definitions in AQL that create a Tweet datatype which is representative of a real tweet as obtained from Twitter.</p>
+
+<div>
+<div>
+<pre class="source">    create dataverse feeds;
+    use dataverse feeds;
+
+    create type TwitterUser as closed {
+        screen_name: string,
+        lang: string,
+        friends_count: int32,
+        statuses_count: int32
+    };
+
+    create type Tweet as open {
+        id: int64,
+        user: TwitterUser
+    }
+
+    create dataset Tweets (Tweet)
+    primary key id;
+</pre></div></div>
+
+<p>We also create a dataset that we shall use to persist the tweets in AsterixDB. Next we make use of the <tt>create feed</tt> AQL statement to define our example data feed.</p>
+<div class="section">
+<h5><a name="Using_the_.E2.80.9Cpush_twitter.E2.80.9D_feed_adapter"></a>Using the &#x201c;push_twitter&#x201d; feed adapter</h5>
+<p>The &#x201c;push_twitter&#x201d; adapter requires setting up an application account with Twitter. To retrieve tweets, Twitter requires registering an application. Registration involves providing a name and a brief description for the application. Each application has associated OAuth authentication credentials that include OAuth keys and tokens. Accessing the Twitter API requires providing the following. 1. Consumer Key (API Key) 2. Consumer Secret (API Secret) 3. Access Token 4. Access Token Secret</p>
+<p>The &#x201c;push_twitter&#x201d; adapter takes as configuration the above mentioned parameters. End users are required to obtain the above authentication credentials prior to using the &#x201c;push_twitter&#x201d; adapter. For further information on obtaining OAuth keys and tokens and registering an application with Twitter, please visit <a class="externalLink" href="http://apps.twitter.com">http://apps.twitter.com</a>.</p>
+<p>Note that AsterixDB uses the Twitter4J API for getting data from Twitter. Due to a license conflict, Apache AsterixDB cannot ship the Twitter4J library. To use the Twitter adapter in AsterixDB, please download the necessary dependencies (<tt>twitter4j-core-4.0.x.jar</tt> and <tt>twitter4j-stream-4.0.x.jar</tt>) and drop them into the <tt>repo/</tt> directory before AsterixDB starts.</p>
+<p>Given below is an example AQL statement that creates a feed called &#x201c;TwitterFeed&#x201d; by using the &#x201c;push_twitter&#x201d; adapter.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+     (&quot;format&quot;=&quot;twitter-status&quot;),
+     (&quot;consumer.key&quot;=&quot;************&quot;),
+     (&quot;consumer.secret&quot;=&quot;**************&quot;),
+     (&quot;access.token&quot;=&quot;**********&quot;),
+     (&quot;access.token.secret&quot;=&quot;*************&quot;));
+</pre></div></div>
+
+<p>It is required that the above authentication parameters are provided valid. Note that the <tt>create feed</tt> statement does not initiate the flow of data from Twitter into the AsterixDB instance. Instead, the <tt>create feed</tt> statement only results in registering the feed with the instance. The flow of data along a feed is initiated when it is connected to a target dataset using the connect feed statement and activated using the start feed statement.</p>
+<p>The Twitter adapter also supports several Twitter streaming APIs as follow:</p>
+<ol style="list-style-type: decimal">
+
+<li>Track filter (&#x201c;keywords&#x201d;=&#x201c;AsterixDB, Apache&#x201d;)</li>
+<li>Locations filter (&#x201c;locations&#x201d;=&#x201c;-29.7, 79.2, 36.7, 72.0; -124.848974,-66.885444, 24.396308, 49.384358&#x201d;)</li>
+<li>Language filter (&#x201c;language&#x201d;=&#x201c;en&#x201d;)</li>
+<li>Filter level (&#x201c;filter-level&#x201d;=&#x201c;low&#x201d;)</li>
+</ol>
+<p>An example of Twitter adapter tracking tweets with keyword &#x201c;news&#x201d; can be described using following ddl:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+     (&quot;format&quot;=&quot;twitter-status&quot;),
+     (&quot;consumer.key&quot;=&quot;************&quot;),
+     (&quot;consumer.secret&quot;=&quot;**************&quot;),
+     (&quot;access.token&quot;=&quot;**********&quot;),
+     (&quot;access.token.secret&quot;=&quot;*************&quot;),
+     (&quot;keywords&quot;=&quot;news&quot;));
+</pre></div></div>
+
+<p>For more details about these APIs, please visit <a class="externalLink" href="https://dev.twitter.com/streaming/overview/request-parameters">https://dev.twitter.com/streaming/overview/request-parameters</a></p></div></div>
+<div class="section">
+<h4><a name="Lifecycle_of_a_Feed"></a>Lifecycle of a Feed</h4>
+<p>A feed is a logical artifact that is brought to life (i.e., its data flow is initiated) only when it is activated using the <tt>start feed</tt> statement. Before we active a feed, we need to designate the dataset where the data to be persisted using <tt>connect feed</tt> statement. Subsequent to a <tt>connect feed</tt> statement, the feed is said to be in the connected state. After that, <tt>start feed</tt> statement will activate the feed, and start the dataflow from feed to its connected dataset. Multiple feeds can simultaneously be connected to a dataset such that the contents of the dataset represent the union of the connected feeds. Also one feed can be simultaneously connected to multiple target datasets.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets;
+
+    start feed TwitterFeed;
+</pre></div></div>
+
+<p>The <tt>connect feed</tt> statement above directs AsterixDB to persist the data from <tt>TwitterFeed</tt> feed into the <tt>Tweets</tt> dataset. The <tt>start feed</tt> statement will activate the feed and start the dataflow. If it is required (by the high-level application) to also retain the raw tweets obtained from Twitter, the end user may additionally choose to connect TwitterFeed to a different dataset.</p>
+<p>Let the feed run for a minute, then run the following query to see the latest tweets that are stored into the data set.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    for $i in dataset Tweets limit 10 return $i;
+</pre></div></div>
+
+<p>The dataflow of data from a feed can be terminated explicitly by <tt>stop feed</tt> statement.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    stop feed TwitterFeed;
+</pre></div></div>
+
+<p>The <tt>disconnnect statement</tt> can be used to disconnect the feed from certain dataset.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    disconnect feed TwitterFeed from dataset Tweets;
+</pre></div></div>
+</div></div>
+<div class="section">
+<h3><a name="Ingesting_with_Other_Adapters"></a>Ingesting with Other Adapters</h3>
+<p>AsterixDB has several builtin feed adapters for data ingestion. User can also implement their own adapters and plug them into AsterixDB. Here we introduce <tt>rss_feed</tt>, <tt>socket_adapter</tt> and <tt>localfs</tt> feed adapter that cover most of the common application scenarios.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Using_the_.E2.80.9Crss_feed.E2.80.9D_feed_adapter"></a>Using the &#x201c;rss_feed&#x201d; feed adapter</h5>
+<p><tt>rss_feed</tt> adapter allows retrieving data given a collection of RSS end point URLs. As observed in the case of ingesting tweets, it is required to model an RSS data item using AQL.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create type Rss if not exists as open {
+        id: string,
+        title: string,
+        description: string,
+        link: string
+    };
+
+    create dataset RssDataset (Rss)
+    primary key id;
+</pre></div></div>
+
+<p>Next, we define an RSS feed using our built-in adapter &#x201c;rss_feed&#x201d;.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create feed my_feed using
+    rss_feed (
+       (&quot;type-name&quot;=&quot;Rss&quot;),
+       (&quot;format&quot;=&quot;rss&quot;),
+       (&quot;url&quot;=&quot;http://rss.cnn.com/rss/edition.rss&quot;)
+    );
+</pre></div></div>
+
+<p>In the above definition, the configuration parameter &#x201c;url&#x201d; can be a comma-separated list that reflects a collection of RSS URLs, where each URL corresponds to an RSS endpoint or an RSS feed. The &#x201c;rss_feed&#x201d; retrieves data from each of the specified RSS URLs (comma separated values) in parallel.</p>
+<p>The following statements connect the feed into the <tt>RssDataset</tt>:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    connect feed my_feed to dataset RssDataset;
+</pre></div></div>
+
+<p>The following statements activate the feed and start the dataflow:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    start feed my_feed;
+</pre></div></div>
+
+<p>The following statements show the latest data from the data set, stop the feed, and disconnect the feed from the data set.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    for $i in dataset RssDataset limit 10 return $i;
+
+    stop feed my_feed
+
+    disconnect feed my_feed from dataset RssDataset;
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Using_the_.E2.80.9Csocket_adapter.E2.80.9D_feed_adapter"></a>Using the &#x201c;socket_adapter&#x201d; feed adapter</h5>
+<p><tt>socket_adapter</tt> feed opens a web socket on the given node which allows user to push data into AsterixDB directly. Here is an example:</p>
+
+<div>
+<div>
+<pre class="source">    drop dataverse feeds if exists;
+    create dataverse feeds;
+    use dataverse feeds;
+
+    create type TestDataType as open {
+       screenName: string
+    }
+
+    create dataset TestDataset(TestDataType) primary key screenName;
+
+    create feed TestSocketFeed using socket_adapter
+    (
+       (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
+       (&quot;address-type&quot;=&quot;IP&quot;),
+       (&quot;type-name&quot;=&quot;TestDataType&quot;),
+       (&quot;format&quot;=&quot;adm&quot;)
+    );
+
+    connect feed TestSocketFeed to dataset TestDataset;
+
+    use dataverse feeds;
+    start feed TestSocketFeed;
+</pre></div></div>
+
+<p>The above statements create a socket feed which is listening to &#x201c;10001&#x201d; port of the host machine. This feed accepts data records in &#x201c;adm&#x201d; format. As an example, you can download the sample dataset <a href="../data/chu.adm">Chirp Users</a> and push them line by line into the socket feed using any socket client you like. Following is a socket client example in Python:</p>
+
+<div>
+<div>
+<pre class="source">    from socket import socket
+
+    ip = '127.0.0.1'
+    port1 = 10001
+    filePath = 'chu.adm'
+
+    sock1 = socket()
+    sock1.connect((ip, port1))
+
+    with open(filePath) as inputData:
+        for line in inputData:
+            sock1.sendall(line)
+        sock1.close()
+</pre></div></div>
+</div></div>
+<div class="section">
+<h4><a name="Using_the_.E2.80.9Clocalfs.E2.80.9D_feed_adapter"></a>Using the &#x201c;localfs&#x201d; feed adapter</h4>
+<p><tt>localfs</tt> adapter enables data ingestion from local file system. It allows user to feed data records on local disk into a dataset. A DDL example for creating a <tt>localfs</tt> feed is given as follow:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create type TweetType as closed {
+      id: string,
+      username : string,
+      location : string,
+      text : string,
+      timestamp : string
+    }
+
+    create dataset Tweets(TweetType)
+    primary key id;
+
+    create feed TweetFeed
+    using localfs
+    ((&quot;type-name&quot;=&quot;TweetType&quot;),(&quot;path&quot;=&quot;HOSTNAME://LOCAL_FILE_PATH&quot;),(&quot;format&quot;=&quot;adm&quot;))
+</pre></div></div>
+
+<p>Similar to previous examples, we need to define the datatype and dataset this feed uses. The &#x201c;path&#x201d; parameter refers to the local datafile that we want to ingest data from. <tt>HOSTNAME</tt> can either be the IP address or node name of the machine which holds the file. <tt>LOCAL_FILE_PATH</tt> indicates the absolute path to the file on that machine. Similarly to <tt>socket_adapter</tt>, this feed takes <tt>adm</tt> formatted data records.</p></div></div>
+<div class="section">
+<h3><a name="Datatype_for_feed_and_target_dataset"></a>Datatype for feed and target dataset</h3>
+<p>The &#x201c;type-name&#x201d; parameter in create feed statement defines the <tt>datatype</tt> of the datasource. In most use cases, feed will have the same <tt>datatype</tt> as the target dataset. However, if we want to perform certain preprocess before the data records gets into the target dataset (append autogenerated key, apply user defined functions, etc.), we will need to define the datatypes for feed and dataset separately.</p>
+<div class="section">
+<h4><a name="Ingestion_with_autogenerated_key"></a>Ingestion with autogenerated key</h4>
+<p>AsterixDB supports using autogenerated uuid as the primary key for dataset. When we use this feature, we will need to define a datatype with the primary key field, and specify that field to be autogenerated when creating the dataset. Use that same datatype in feed definition will cause a type discrepancy since there is no such field in the datasource. Thus, we will need to define two separate datatypes for feed and dataset:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create type DBLPFeedType as closed {
+      dblpid: string,
+      title: string,
+      authors: string,
+      misc: string
+    }
+
+    create type DBLPDataSetType as open {
+      id: uuid,
+      dblpid: string,
+      title: string,
+      authors: string,
+      misc: string
+    }
+    create dataset DBLPDataset(DBLPDataSetType) primary key id autogenerated;
+
+    create feed DBLPFeed using socket_adapter
+    (
+        (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
+        (&quot;address-type&quot;=&quot;IP&quot;),
+        (&quot;type-name&quot;=&quot;DBLPFeedType&quot;),
+        (&quot;format&quot;=&quot;adm&quot;)
+    );
+
+    connect feed DBLPFeed to dataset DBLPDataset;
+
+    start feed DBLPFeed;
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h2><a name="Policies_for_Feed_Ingestion"></a><a name="FeedPolicies">Policies for Feed Ingestion</a></h2>
+<p>Multiple feeds may be concurrently operational on an AsterixDB cluster, each competing for resources (CPU cycles, network bandwidth, disk IO) to maintain pace with their respective data sources. As a data management system, AsterixDB is able to manage a set of concurrent feeds and make dynamic decisions related to the allocation of resources, resolving resource bottlenecks and the handling of failures. Each feed has its own set of constraints, influenced largely by the nature of its data source and the applications that intend to consume and process the ingested data. Consider an application that intends to discover the trending topics on Twitter by analyzing tweets that are being processed. Losing a few tweets may be acceptable. In contrast, when ingesting from a data source that provides a click-stream of ad clicks, losing data would translate to a loss of revenue for an application that tracks revenue by charging advertisers per click.</p>
+<p>AsterixDB allows a data feed to have an associated ingestion policy that is expressed as a collection of parameters and associated values. An ingestion policy dictates the runtime behavior of the feed in response to resource bottlenecks and failures. AsterixDB provides a set of policies that help customize the system&#x2019;s runtime behavior when handling excess objects.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Policies"></a>Policies</h4>
+<ul>
+
+<li>
+
+<p><i>Spill</i>: Objects that cannot be processed by an operator for lack of resources (referred to as excess objects hereafter) should be persisted to the local disk for deferred processing.</p>
+</li>
+<li>
+
+<p><i>Discard</i>: Excess objects should be discarded.</p>
+</li>
+</ul>
+<p>Note that the end user may choose to form a custom policy.  For example, it is possible in AsterixDB to create a custom policy that spills excess objects to disk and subsequently resorts to throttling if the spillage crosses a configured threshold. In all cases, the desired ingestion policy is specified as part of the <tt>connect feed</tt> statement or else the &#x201c;Basic&#x201d; policy will be chosen as the default.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets
+    using policy Basic;
+</pre></div></div></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>


[03/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/sqlpp/filters.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/sqlpp/filters.html b/docs/0.9.4/sqlpp/filters.html
new file mode 100644
index 0000000..89dd619
--- /dev/null
+++ b/docs/0.9.4/sqlpp/filters.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/filters.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; Filter-Based LSM Index Acceleration</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>Filter-Based LSM Index Acceleration</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="#Motivation">Motivation</a></li>
+<li><a href="#FiltersInAsterixDB">Filters in AsterixDB</a></li>
+<li><a href="#FiltersAndMergePolicies">Filters and Merge Policies</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Traditional relational databases usually employ conventional index structures such as B+ trees due to their low read latency.  However, such traditional index structures use in-place writes to perform updates, resulting in costly random writes to disk. Today&#x2019;s emerging applications often involve insert-intensive workloads for which the cost of random writes prohibits efficient ingestion of data. Consequently, popular NoSQL systems such as Cassandra, HBase, LevelDB, BigTable, etc. have adopted Log-Structured Merge (LSM) Trees as their storage structure. LSM-trees avoids the cost of random writes by batching updates into a component of the index that resides in main memory &#x2013; an <i>in-memory component</i>. When the space occupancy of the in-memory component exceeds a specified threshold, its entries are <i>flushed</i> to disk forming a new component &#x2013; a <i>disk component</i>. As disk components accumulate on disk, they are periodically merged together subject to
  a <i>merge policy</i> that decides when and what to merge. The benefit of the LSM-trees comes at the cost of possibly sacrificing read efficiency, but, it has been shown in previous studies that these inefficiencies can be mostly mitigated.</p>
+<p>AsterixDB has also embraced LSM-trees, not just by using them as primary indexes, but also by using the same LSM-ification technique for all of its secondary index structures. In particular, AsterixDB adopted a generic framework for converting a class of indexes (that includes conventional B+ trees, R trees, and inverted indexes) into LSM-based secondary indexes, allowing higher data ingestion rates. In fact, for certain index structures, our results have shown that using an LSM-based version of an index can be made to significantly outperform its conventional counterpart for <i>both</i> ingestion and query speed (an example of such an index being the R-tree for spatial data).</p>
+<p>Since an LSM-based index naturally partitions data into multiple disk components, it is possible, when answering certain queries, to exploit partitioning to only access some components and safely filter out the remaining components, thus reducing query times. For instance, referring to our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, suppose a user always retrieves tweets from the <tt>TweetMessages</tt> dataset based on the <tt>send-time</tt> field (e.g., tweets posted in the last 24 hours). Since there is not a secondary index on the <tt>send-time</tt> field, the only available option for AsterixDB would be to scan the whole <tt>TweetMessages</tt> dataset and then apply the predicate as a post-processing step. However, if disk components of the primary index were tagged with the minimum and maximum timestamp values of the objects they contain, we could utilize the tagged information to directly access the primary index and prune comp
 onents that do not match the query predicate. Thus, we could save substantial cost by avoiding scanning the whole dataset and only access the relevant components. We simply call such tagging information that are associated with components, filters. (Note that even if there were a secondary index on <tt>send-time</tt> field, using filters could save substantial cost by avoiding accessing the secondary index, followed by probing the primary index for every fetched entry.) Moreover, the same filtering technique can also be used with any secondary LSM index (e.g., an LSM R-tree), in case the query contains multiple predicates (e.g., spatial and temporal predicates), to obtain similar pruning power.</p></div>
+<div class="section">
+<h2><a name="Filters_in_AsterixDB_.5BBack_to_TOC.5D"></a><a name="FiltersInAsterixDB" id="FiltersInAsterixDB">Filters in AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We have added support for LSM-based filters to all of AsterixDB&#x2019;s index types. To enable the use of filters, the user must specify the filter&#x2019;s key when creating a dataset, as shown below:</p>
+<div class="section">
+<div class="section">
+<h4><a name="Creating_a_Dataset_with_a_Filter"></a>Creating a Dataset with a Filter</h4>
+
+<div>
+<div>
+<pre class="source">    create dataset Tweets(TweetType) primary key tweetid with filter on send-time;
+</pre></div></div>
+
+<p>Filters can be created on any totally ordered datatype (i.e., any field that can be indexed using a B+ -tree), such as integers, doubles, floats, UUIDs, datetimes, etc.</p>
+<p>When a dataset with a filter is created, the name of the filter&#x2019;s key field is persisted in the <tt>Metadata.Dataset</tt> dataset (which is the metadata dataset that stores the details of each dataset in an AsterixDB instance) so that DML operations against the dataset can recognize the existence of filters and can update them or utilize them accordingly. Creating a dataset with a filter in AsterixDB implies that the primary and all secondary indexes of that dataset will maintain filters on their disk components. Once a filtered dataset is created, the user can use the dataset normally (just like any other dataset). AsterixDB will automatically maintain the filters and will leverage them to efficiently answer queries whenever possible (i.e., when a query has predicates on the filter&#x2019;s key).</p></div></div></div>
+<div class="section">
+<h2><a name="Filters_and_Merge_Policies_.5BBack_to_TOC.5D"></a><a name="FiltersAndMergePolicies" id="FiltersAndMergePolicies">Filters and Merge Policies</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The AsterixDB default merge policy, the prefix merge policy, relies on component sizes and the number of components to decide which components to merge. This merge policy has proven to provide excellent performance for both ingestion and queries. However, when evaluating our filtering solution with the prefix policy, we observed a behavior that can reduce filter effectiveness. In particular, we noticed that under the prefix merge policy, the disk components of a secondary index tend to be constantly merged into a single component. This is because the prefix policy relies on a single size parameter for all of the indexes of a dataset. This parameter is typically chosen based on the sizes of the disk components of the primary index, which tend to be much larger than the sizes of the secondary indexes&#x2019; disk components. This difference caused the prefix merge policy to behave similarly to the constant merge policy (i.e., relatively poorly) when applied to secondary indexes in 
 the sense that the secondary indexes are constantly merged into a single disk component. Consequently, the effectiveness of filters on secondary indexes was greatly reduced under the prefix-merge policy, but they were still effective when probing the primary index.  Based on this behavior, we developed a new merge policy, an improved version of the prefix policy, called the correlated-prefix policy. The basic idea of this policy is that it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests to the I/O scheduler on behalf of all other indexes associated with the same dataset. The end result is that secondary indexes will always have the same number of disk components as their primary index under the correlated-prefix merge policy. This has improved query perfo
 rmance, since disk components of secondary indexes now have a much better chance of being pruned.</p></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/sqlpp/fulltext.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/sqlpp/fulltext.html b/docs/0.9.4/sqlpp/fulltext.html
new file mode 100644
index 0000000..ac02593
--- /dev/null
+++ b/docs/0.9.4/sqlpp/fulltext.html
@@ -0,0 +1,208 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/fulltext.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; AsterixDB  Support of Full-text search queries</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>AsterixDB  Support of Full-text search queries</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="#Motivation">Motivation</a></li>
+<li><a href="#Syntax">Syntax</a></li>
+<li><a href="#FulltextIndex">Creating and utilizing a Full-text index</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Full-Text Search (FTS) queries are widely used in applications where users need to find records that satisfy an FTS predicate, i.e., where simple string-based matching is not sufficient. These queries are important when finding documents that contain a certain keyword is crucial. FTS queries are different from substring matching queries in that FTS queries find their query predicates as exact keywords in the given string, rather than treating a query predicate as a sequence of characters. For example, an FTS query that finds &#x201c;rain&#x201d; correctly returns a document when it contains &#x201c;rain&#x201d; as a word. However, a substring-matching query returns a document whenever it contains &#x201c;rain&#x201d; as a substring, for instance, a document with &#x201c;brain&#x201d; or &#x201c;training&#x201d; would be returned as well.</p></div>
+<div class="section">
+<h2><a name="Syntax_.5BBack_to_TOC.5D"></a><a name="Syntax" id="Syntax">Syntax</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The syntax of AsterixDB FTS follows a portion of the XQuery FullText Search syntax. Two basic forms are as follows:</p>
+
+<div>
+<div>
+<pre class="source">    ftcontains(Expression1, Expression2, {FullTextOption})
+    ftcontains(Expression1, Expression2)
+</pre></div></div>
+
+<p>For example, we can execute the following query to find tweet messages where the <tt>message-text</tt> field includes &#x201c;voice&#x201d; as a word. Please note that an FTS search is case-insensitive. Thus, &#x201c;Voice&#x201d; or &#x201c;voice&#x201d; will be evaluated as the same word.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $msg in dataset TweetMessages
+    where ftcontains($msg.message-text, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
+    return {&quot;id&quot;: $msg.id}
+</pre></div></div>
+
+<p>The DDL and DML of TinySocial can be found in <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">ADM: Modeling Semistructed Data in AsterixDB</a>.</p>
+<p>The same query can be also expressed in the SQL++.</p>
+
+<div>
+<div>
+<pre class="source">    use TinySocial;
+
+    select element {&quot;id&quot;:msg.id}
+    from TweetMessages as msg
+    where TinySocial.ftcontains(msg.`message-text`, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>The <tt>Expression1</tt> is an expression that should be evaluable as a string at runtime as in the above example where <tt>$msg.message-text</tt> is a string field. The <tt>Expression2</tt> can be a string, an (un)ordered list of string value(s), or an expression. In the last case, the given expression should be evaluable into one of the first two types, i.e., into a string value or an (un)ordered list of string value(s).</p>
+<p>The following examples are all valid expressions.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound&quot;)
+   ... where ftcontains($msg.message-text, &quot;sound&quot;, {&quot;mode&quot;:&quot;any&quot;})
+   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
+   ... where ftcontains($msg.message-text, {{&quot;speed&quot;, &quot;stand&quot;, &quot;customization&quot;}}, {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, let $keyword_list := [&quot;voice&quot;, &quot;system&quot;] return $keyword_list, {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, $keyword_list, {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>In the last example above, <tt>$keyword_list</tt> should evaluate to a string or an (un)ordered list of string value(s).</p>
+<p>The last <tt>FullTextOption</tt> parameter clarifies the given FTS request. If you omit the <tt>FullTextOption</tt> parameter, then the default value will be set for each possible option. Currently, we only have one option named <tt>mode</tt>. And as we extend the FTS feature, more options will be added. Please note that the format of <tt>FullTextOption</tt> is a record, thus you need to put the option(s) in a record <tt>{}</tt>. The <tt>mode</tt> option indicates whether the given FTS query is a conjunctive (AND) or disjunctive (OR) search request. This option can be either <tt>&#x201c;any&#x201d;</tt> or <tt>&#x201c;all&#x201d;</tt>. The default value for <tt>mode</tt> is <tt>&#x201c;all&#x201d;</tt>. If one specifies <tt>&#x201c;any&#x201d;</tt>, a disjunctive search will be conducted. For example, the following query will find documents whose <tt>message-text</tt> field contains &#x201c;sound&#x201d; or &#x201c;system&#x201d;, so a document will be returned if it contains eit
 her &#x201c;sound&#x201d;, &#x201c;system&#x201d;, or both of the keywords.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>The other option parameter,<tt>&#x201c;all&#x201d;</tt>, specifies a conjunctive search. The following examples will find the documents whose <tt>message-text</tt> field contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;. If a document contains only &#x201c;sound&#x201d; or &#x201c;system&#x201d; but not both, it will not be returned.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
+</pre></div></div>
+
+<p>Currently AsterixDB doesn&#x2019;t (yet) support phrase searches, so the following query will not work.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound system&quot;, {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>As a workaround solution, the following query can be used to achieve a roughly similar goal. The difference is that the following queries will find documents where <tt>$msg.message-text</tt> contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;, but the order and adjacency of &#x201c;sound&#x201d; and &#x201c;system&#x201d; are not checked, unlike in a phrase search. As a result, the query below would also return documents with &#x201c;sound system can be installed.&#x201d;, &#x201c;system sound is perfect.&#x201d;, or &#x201c;sound is not clear. You may need to install a new system.&#x201d;</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="Creating_and_utilizing_a_Full-text_index_.5BBack_to_TOC.5D"></a><a name="FulltextIndex" id="FulltextIndex">Creating and utilizing a Full-text index</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>When there is a full-text index on the field that is being searched, rather than scanning all records, AsterixDB can utilize that index to expedite the execution of a FTS query. To create a full-text index, you need to specify the index type as <tt>fulltext</tt> in your DDL statement. For instance, the following DDL statement create a full-text index on the TweetMessages.message-text attribute.</p>
+
+<div>
+<div>
+<pre class="source">create index messageFTSIdx on TweetMessages(message-text) type fulltext;
+</pre></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>


[04/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/sqlpp/builtins.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/sqlpp/builtins.html b/docs/0.9.4/sqlpp/builtins.html
new file mode 100644
index 0000000..2ace95a
--- /dev/null
+++ b/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_radius</h3>
+<ul>
+
+<li>
+
+<p>S

<TRUNCATED>

[11/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/sqlpp/filters.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/sqlpp/filters.html b/content/docs/0.9.4/sqlpp/filters.html
new file mode 100644
index 0000000..89dd619
--- /dev/null
+++ b/content/docs/0.9.4/sqlpp/filters.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/filters.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; Filter-Based LSM Index Acceleration</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>Filter-Based LSM Index Acceleration</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="#Motivation">Motivation</a></li>
+<li><a href="#FiltersInAsterixDB">Filters in AsterixDB</a></li>
+<li><a href="#FiltersAndMergePolicies">Filters and Merge Policies</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Traditional relational databases usually employ conventional index structures such as B+ trees due to their low read latency.  However, such traditional index structures use in-place writes to perform updates, resulting in costly random writes to disk. Today&#x2019;s emerging applications often involve insert-intensive workloads for which the cost of random writes prohibits efficient ingestion of data. Consequently, popular NoSQL systems such as Cassandra, HBase, LevelDB, BigTable, etc. have adopted Log-Structured Merge (LSM) Trees as their storage structure. LSM-trees avoids the cost of random writes by batching updates into a component of the index that resides in main memory &#x2013; an <i>in-memory component</i>. When the space occupancy of the in-memory component exceeds a specified threshold, its entries are <i>flushed</i> to disk forming a new component &#x2013; a <i>disk component</i>. As disk components accumulate on disk, they are periodically merged together subject to
  a <i>merge policy</i> that decides when and what to merge. The benefit of the LSM-trees comes at the cost of possibly sacrificing read efficiency, but, it has been shown in previous studies that these inefficiencies can be mostly mitigated.</p>
+<p>AsterixDB has also embraced LSM-trees, not just by using them as primary indexes, but also by using the same LSM-ification technique for all of its secondary index structures. In particular, AsterixDB adopted a generic framework for converting a class of indexes (that includes conventional B+ trees, R trees, and inverted indexes) into LSM-based secondary indexes, allowing higher data ingestion rates. In fact, for certain index structures, our results have shown that using an LSM-based version of an index can be made to significantly outperform its conventional counterpart for <i>both</i> ingestion and query speed (an example of such an index being the R-tree for spatial data).</p>
+<p>Since an LSM-based index naturally partitions data into multiple disk components, it is possible, when answering certain queries, to exploit partitioning to only access some components and safely filter out the remaining components, thus reducing query times. For instance, referring to our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, suppose a user always retrieves tweets from the <tt>TweetMessages</tt> dataset based on the <tt>send-time</tt> field (e.g., tweets posted in the last 24 hours). Since there is not a secondary index on the <tt>send-time</tt> field, the only available option for AsterixDB would be to scan the whole <tt>TweetMessages</tt> dataset and then apply the predicate as a post-processing step. However, if disk components of the primary index were tagged with the minimum and maximum timestamp values of the objects they contain, we could utilize the tagged information to directly access the primary index and prune comp
 onents that do not match the query predicate. Thus, we could save substantial cost by avoiding scanning the whole dataset and only access the relevant components. We simply call such tagging information that are associated with components, filters. (Note that even if there were a secondary index on <tt>send-time</tt> field, using filters could save substantial cost by avoiding accessing the secondary index, followed by probing the primary index for every fetched entry.) Moreover, the same filtering technique can also be used with any secondary LSM index (e.g., an LSM R-tree), in case the query contains multiple predicates (e.g., spatial and temporal predicates), to obtain similar pruning power.</p></div>
+<div class="section">
+<h2><a name="Filters_in_AsterixDB_.5BBack_to_TOC.5D"></a><a name="FiltersInAsterixDB" id="FiltersInAsterixDB">Filters in AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>We have added support for LSM-based filters to all of AsterixDB&#x2019;s index types. To enable the use of filters, the user must specify the filter&#x2019;s key when creating a dataset, as shown below:</p>
+<div class="section">
+<div class="section">
+<h4><a name="Creating_a_Dataset_with_a_Filter"></a>Creating a Dataset with a Filter</h4>
+
+<div>
+<div>
+<pre class="source">    create dataset Tweets(TweetType) primary key tweetid with filter on send-time;
+</pre></div></div>
+
+<p>Filters can be created on any totally ordered datatype (i.e., any field that can be indexed using a B+ -tree), such as integers, doubles, floats, UUIDs, datetimes, etc.</p>
+<p>When a dataset with a filter is created, the name of the filter&#x2019;s key field is persisted in the <tt>Metadata.Dataset</tt> dataset (which is the metadata dataset that stores the details of each dataset in an AsterixDB instance) so that DML operations against the dataset can recognize the existence of filters and can update them or utilize them accordingly. Creating a dataset with a filter in AsterixDB implies that the primary and all secondary indexes of that dataset will maintain filters on their disk components. Once a filtered dataset is created, the user can use the dataset normally (just like any other dataset). AsterixDB will automatically maintain the filters and will leverage them to efficiently answer queries whenever possible (i.e., when a query has predicates on the filter&#x2019;s key).</p></div></div></div>
+<div class="section">
+<h2><a name="Filters_and_Merge_Policies_.5BBack_to_TOC.5D"></a><a name="FiltersAndMergePolicies" id="FiltersAndMergePolicies">Filters and Merge Policies</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The AsterixDB default merge policy, the prefix merge policy, relies on component sizes and the number of components to decide which components to merge. This merge policy has proven to provide excellent performance for both ingestion and queries. However, when evaluating our filtering solution with the prefix policy, we observed a behavior that can reduce filter effectiveness. In particular, we noticed that under the prefix merge policy, the disk components of a secondary index tend to be constantly merged into a single component. This is because the prefix policy relies on a single size parameter for all of the indexes of a dataset. This parameter is typically chosen based on the sizes of the disk components of the primary index, which tend to be much larger than the sizes of the secondary indexes&#x2019; disk components. This difference caused the prefix merge policy to behave similarly to the constant merge policy (i.e., relatively poorly) when applied to secondary indexes in 
 the sense that the secondary indexes are constantly merged into a single disk component. Consequently, the effectiveness of filters on secondary indexes was greatly reduced under the prefix-merge policy, but they were still effective when probing the primary index.  Based on this behavior, we developed a new merge policy, an improved version of the prefix policy, called the correlated-prefix policy. The basic idea of this policy is that it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests to the I/O scheduler on behalf of all other indexes associated with the same dataset. The end result is that secondary indexes will always have the same number of disk components as their primary index under the correlated-prefix merge policy. This has improved query perfo
 rmance, since disk components of secondary indexes now have a much better chance of being pruned.</p></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/sqlpp/fulltext.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/sqlpp/fulltext.html b/content/docs/0.9.4/sqlpp/fulltext.html
new file mode 100644
index 0000000..ac02593
--- /dev/null
+++ b/content/docs/0.9.4/sqlpp/fulltext.html
@@ -0,0 +1,208 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/fulltext.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; AsterixDB  Support of Full-text search queries</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>AsterixDB  Support of Full-text search queries</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="#Motivation">Motivation</a></li>
+<li><a href="#Syntax">Syntax</a></li>
+<li><a href="#FulltextIndex">Creating and utilizing a Full-text index</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Full-Text Search (FTS) queries are widely used in applications where users need to find records that satisfy an FTS predicate, i.e., where simple string-based matching is not sufficient. These queries are important when finding documents that contain a certain keyword is crucial. FTS queries are different from substring matching queries in that FTS queries find their query predicates as exact keywords in the given string, rather than treating a query predicate as a sequence of characters. For example, an FTS query that finds &#x201c;rain&#x201d; correctly returns a document when it contains &#x201c;rain&#x201d; as a word. However, a substring-matching query returns a document whenever it contains &#x201c;rain&#x201d; as a substring, for instance, a document with &#x201c;brain&#x201d; or &#x201c;training&#x201d; would be returned as well.</p></div>
+<div class="section">
+<h2><a name="Syntax_.5BBack_to_TOC.5D"></a><a name="Syntax" id="Syntax">Syntax</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The syntax of AsterixDB FTS follows a portion of the XQuery FullText Search syntax. Two basic forms are as follows:</p>
+
+<div>
+<div>
+<pre class="source">    ftcontains(Expression1, Expression2, {FullTextOption})
+    ftcontains(Expression1, Expression2)
+</pre></div></div>
+
+<p>For example, we can execute the following query to find tweet messages where the <tt>message-text</tt> field includes &#x201c;voice&#x201d; as a word. Please note that an FTS search is case-insensitive. Thus, &#x201c;Voice&#x201d; or &#x201c;voice&#x201d; will be evaluated as the same word.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $msg in dataset TweetMessages
+    where ftcontains($msg.message-text, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
+    return {&quot;id&quot;: $msg.id}
+</pre></div></div>
+
+<p>The DDL and DML of TinySocial can be found in <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">ADM: Modeling Semistructed Data in AsterixDB</a>.</p>
+<p>The same query can be also expressed in the SQL++.</p>
+
+<div>
+<div>
+<pre class="source">    use TinySocial;
+
+    select element {&quot;id&quot;:msg.id}
+    from TweetMessages as msg
+    where TinySocial.ftcontains(msg.`message-text`, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>The <tt>Expression1</tt> is an expression that should be evaluable as a string at runtime as in the above example where <tt>$msg.message-text</tt> is a string field. The <tt>Expression2</tt> can be a string, an (un)ordered list of string value(s), or an expression. In the last case, the given expression should be evaluable into one of the first two types, i.e., into a string value or an (un)ordered list of string value(s).</p>
+<p>The following examples are all valid expressions.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound&quot;)
+   ... where ftcontains($msg.message-text, &quot;sound&quot;, {&quot;mode&quot;:&quot;any&quot;})
+   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
+   ... where ftcontains($msg.message-text, {{&quot;speed&quot;, &quot;stand&quot;, &quot;customization&quot;}}, {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, let $keyword_list := [&quot;voice&quot;, &quot;system&quot;] return $keyword_list, {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, $keyword_list, {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>In the last example above, <tt>$keyword_list</tt> should evaluate to a string or an (un)ordered list of string value(s).</p>
+<p>The last <tt>FullTextOption</tt> parameter clarifies the given FTS request. If you omit the <tt>FullTextOption</tt> parameter, then the default value will be set for each possible option. Currently, we only have one option named <tt>mode</tt>. And as we extend the FTS feature, more options will be added. Please note that the format of <tt>FullTextOption</tt> is a record, thus you need to put the option(s) in a record <tt>{}</tt>. The <tt>mode</tt> option indicates whether the given FTS query is a conjunctive (AND) or disjunctive (OR) search request. This option can be either <tt>&#x201c;any&#x201d;</tt> or <tt>&#x201c;all&#x201d;</tt>. The default value for <tt>mode</tt> is <tt>&#x201c;all&#x201d;</tt>. If one specifies <tt>&#x201c;any&#x201d;</tt>, a disjunctive search will be conducted. For example, the following query will find documents whose <tt>message-text</tt> field contains &#x201c;sound&#x201d; or &#x201c;system&#x201d;, so a document will be returned if it contains eit
 her &#x201c;sound&#x201d;, &#x201c;system&#x201d;, or both of the keywords.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>The other option parameter,<tt>&#x201c;all&#x201d;</tt>, specifies a conjunctive search. The following examples will find the documents whose <tt>message-text</tt> field contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;. If a document contains only &#x201c;sound&#x201d; or &#x201c;system&#x201d; but not both, it will not be returned.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
+</pre></div></div>
+
+<p>Currently AsterixDB doesn&#x2019;t (yet) support phrase searches, so the following query will not work.</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound system&quot;, {&quot;mode&quot;:&quot;any&quot;})
+</pre></div></div>
+
+<p>As a workaround solution, the following query can be used to achieve a roughly similar goal. The difference is that the following queries will find documents where <tt>$msg.message-text</tt> contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;, but the order and adjacency of &#x201c;sound&#x201d; and &#x201c;system&#x201d; are not checked, unlike in a phrase search. As a result, the query below would also return documents with &#x201c;sound system can be installed.&#x201d;, &#x201c;system sound is perfect.&#x201d;, or &#x201c;sound is not clear. You may need to install a new system.&#x201d;</p>
+
+<div>
+<div>
+<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
+   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="Creating_and_utilizing_a_Full-text_index_.5BBack_to_TOC.5D"></a><a name="FulltextIndex" id="FulltextIndex">Creating and utilizing a Full-text index</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>When there is a full-text index on the field that is being searched, rather than scanning all records, AsterixDB can utilize that index to expedite the execution of a FTS query. To create a full-text index, you need to specify the index type as <tt>fulltext</tt> in your DDL statement. For instance, the following DDL statement create a full-text index on the TweetMessages.message-text attribute.</p>
+
+<div>
+<div>
+<pre class="source">create index messageFTSIdx on TweetMessages(message-text) type fulltext;
+</pre></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>


[15/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/externaldata.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/externaldata.html b/content/docs/0.9.4/aql/externaldata.html
index 6c06dc9..5cbe512 100644
--- a/content/docs/0.9.4/aql/externaldata.html
+++ b/content/docs/0.9.4/aql/externaldata.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/externaldata.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/externaldata.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Accessing External Data in AsterixDB</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li class="active"><a href="#"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/filters.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/filters.html b/content/docs/0.9.4/aql/filters.html
deleted file mode 100644
index 8c18a52..0000000
--- a/content/docs/0.9.4/aql/filters.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/filters.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Filter-Based LSM Index Acceleration</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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>Filter-Based LSM Index Acceleration</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="#Motivation">Motivation</a></li>
-<li><a href="#FiltersInAsterixDB">Filters in AsterixDB</a></li>
-<li><a href="#FiltersAndMergePolicies">Filters and Merge Policies</a></li>
-</ul></div>
-<div class="section">
-<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>Traditional relational databases usually employ conventional index structures such as B+ trees due to their low read latency.  However, such traditional index structures use in-place writes to perform updates, resulting in costly random writes to disk. Today&#x2019;s emerging applications often involve insert-intensive workloads for which the cost of random writes prohibits efficient ingestion of data. Consequently, popular NoSQL systems such as Cassandra, HBase, LevelDB, BigTable, etc. have adopted Log-Structured Merge (LSM) Trees as their storage structure. LSM-trees avoids the cost of random writes by batching updates into a component of the index that resides in main memory &#x2013; an <i>in-memory component</i>. When the space occupancy of the in-memory component exceeds a specified threshold, its entries are <i>flushed</i> to disk forming a new component &#x2013; a <i>disk component</i>. As disk components accumulate on disk, they are periodically merged together subject to
  a <i>merge policy</i> that decides when and what to merge. The benefit of the LSM-trees comes at the cost of possibly sacrificing read efficiency, but, it has been shown in previous studies that these inefficiencies can be mostly mitigated.</p>
-<p>AsterixDB has also embraced LSM-trees, not just by using them as primary indexes, but also by using the same LSM-ification technique for all of its secondary index structures. In particular, AsterixDB adopted a generic framework for converting a class of indexes (that includes conventional B+ trees, R trees, and inverted indexes) into LSM-based secondary indexes, allowing higher data ingestion rates. In fact, for certain index structures, our results have shown that using an LSM-based version of an index can be made to significantly outperform its conventional counterpart for <i>both</i> ingestion and query speed (an example of such an index being the R-tree for spatial data).</p>
-<p>Since an LSM-based index naturally partitions data into multiple disk components, it is possible, when answering certain queries, to exploit partitioning to only access some components and safely filter out the remaining components, thus reducing query times. For instance, referring to our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, suppose a user always retrieves tweets from the <tt>TweetMessages</tt> dataset based on the <tt>send-time</tt> field (e.g., tweets posted in the last 24 hours). Since there is not a secondary index on the <tt>send-time</tt> field, the only available option for AsterixDB would be to scan the whole <tt>TweetMessages</tt> dataset and then apply the predicate as a post-processing step. However, if disk components of the primary index were tagged with the minimum and maximum timestamp values of the objects they contain, we could utilize the tagged information to directly access the primary index and prune comp
 onents that do not match the query predicate. Thus, we could save substantial cost by avoiding scanning the whole dataset and only access the relevant components. We simply call such tagging information that are associated with components, filters. (Note that even if there were a secondary index on <tt>send-time</tt> field, using filters could save substantial cost by avoiding accessing the secondary index, followed by probing the primary index for every fetched entry.) Moreover, the same filtering technique can also be used with any secondary LSM index (e.g., an LSM R-tree), in case the query contains multiple predicates (e.g., spatial and temporal predicates), to obtain similar pruning power.</p></div>
-<div class="section">
-<h2><a name="Filters_in_AsterixDB_.5BBack_to_TOC.5D"></a><a name="FiltersInAsterixDB" id="FiltersInAsterixDB">Filters in AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>We have added support for LSM-based filters to all of AsterixDB&#x2019;s index types. To enable the use of filters, the user must specify the filter&#x2019;s key when creating a dataset, as shown below:</p>
-<div class="section">
-<div class="section">
-<h4><a name="Creating_a_Dataset_with_a_Filter"></a>Creating a Dataset with a Filter</h4>
-
-<div>
-<div>
-<pre class="source">    create dataset Tweets(TweetType) primary key tweetid with filter on send-time;
-</pre></div></div>
-
-<p>Filters can be created on any totally ordered datatype (i.e., any field that can be indexed using a B+ -tree), such as integers, doubles, floats, UUIDs, datetimes, etc.</p>
-<p>When a dataset with a filter is created, the name of the filter&#x2019;s key field is persisted in the <tt>Metadata.Dataset</tt> dataset (which is the metadata dataset that stores the details of each dataset in an AsterixDB instance) so that DML operations against the dataset can recognize the existence of filters and can update them or utilize them accordingly. Creating a dataset with a filter in AsterixDB implies that the primary and all secondary indexes of that dataset will maintain filters on their disk components. Once a filtered dataset is created, the user can use the dataset normally (just like any other dataset). AsterixDB will automatically maintain the filters and will leverage them to efficiently answer queries whenever possible (i.e., when a query has predicates on the filter&#x2019;s key).</p></div></div></div>
-<div class="section">
-<h2><a name="Filters_and_Merge_Policies_.5BBack_to_TOC.5D"></a><a name="FiltersAndMergePolicies" id="FiltersAndMergePolicies">Filters and Merge Policies</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>The AsterixDB default merge policy, the prefix merge policy, relies on component sizes and the number of components to decide which components to merge. This merge policy has proven to provide excellent performance for both ingestion and queries. However, when evaluating our filtering solution with the prefix policy, we observed a behavior that can reduce filter effectiveness. In particular, we noticed that under the prefix merge policy, the disk components of a secondary index tend to be constantly merged into a single component. This is because the prefix policy relies on a single size parameter for all of the indexes of a dataset. This parameter is typically chosen based on the sizes of the disk components of the primary index, which tend to be much larger than the sizes of the secondary indexes&#x2019; disk components. This difference caused the prefix merge policy to behave similarly to the constant merge policy (i.e., relatively poorly) when applied to secondary indexes in 
 the sense that the secondary indexes are constantly merged into a single disk component. Consequently, the effectiveness of filters on secondary indexes was greatly reduced under the prefix-merge policy, but they were still effective when probing the primary index.  Based on this behavior, we developed a new merge policy, an improved version of the prefix policy, called the correlated-prefix policy. The basic idea of this policy is that it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests to the I/O scheduler on behalf of all other indexes associated with the same dataset. The end result is that secondary indexes will always have the same number of disk components as their primary index under the correlated-prefix merge policy. This has improved query perfo
 rmance, since disk components of secondary indexes now have a much better chance of being pruned.</p></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/fulltext.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/fulltext.html b/content/docs/0.9.4/aql/fulltext.html
deleted file mode 100644
index 022e124..0000000
--- a/content/docs/0.9.4/aql/fulltext.html
+++ /dev/null
@@ -1,208 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/fulltext.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; AsterixDB  Support of Full-text search queries</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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>AsterixDB  Support of Full-text search queries</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="#Motivation">Motivation</a></li>
-<li><a href="#Syntax">Syntax</a></li>
-<li><a href="#FulltextIndex">Creating and utilizing a Full-text index</a></li>
-</ul></div>
-<div class="section">
-<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>Full-Text Search (FTS) queries are widely used in applications where users need to find records that satisfy an FTS predicate, i.e., where simple string-based matching is not sufficient. These queries are important when finding documents that contain a certain keyword is crucial. FTS queries are different from substring matching queries in that FTS queries find their query predicates as exact keywords in the given string, rather than treating a query predicate as a sequence of characters. For example, an FTS query that finds &#x201c;rain&#x201d; correctly returns a document when it contains &#x201c;rain&#x201d; as a word. However, a substring-matching query returns a document whenever it contains &#x201c;rain&#x201d; as a substring, for instance, a document with &#x201c;brain&#x201d; or &#x201c;training&#x201d; would be returned as well.</p></div>
-<div class="section">
-<h2><a name="Syntax_.5BBack_to_TOC.5D"></a><a name="Syntax" id="Syntax">Syntax</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>The syntax of AsterixDB FTS follows a portion of the XQuery FullText Search syntax. Two basic forms are as follows:</p>
-
-<div>
-<div>
-<pre class="source">    ftcontains(Expression1, Expression2, {FullTextOption})
-    ftcontains(Expression1, Expression2)
-</pre></div></div>
-
-<p>For example, we can execute the following query to find tweet messages where the <tt>message-text</tt> field includes &#x201c;voice&#x201d; as a word. Please note that an FTS search is case-insensitive. Thus, &#x201c;Voice&#x201d; or &#x201c;voice&#x201d; will be evaluated as the same word.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $msg in dataset TweetMessages
-    where ftcontains($msg.message-text, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
-    return {&quot;id&quot;: $msg.id}
-</pre></div></div>
-
-<p>The DDL and DML of TinySocial can be found in <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">ADM: Modeling Semistructed Data in AsterixDB</a>.</p>
-<p>The same query can be also expressed in the SQL++.</p>
-
-<div>
-<div>
-<pre class="source">    use TinySocial;
-
-    select element {&quot;id&quot;:msg.id}
-    from TweetMessages as msg
-    where TinySocial.ftcontains(msg.`message-text`, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>The <tt>Expression1</tt> is an expression that should be evaluable as a string at runtime as in the above example where <tt>$msg.message-text</tt> is a string field. The <tt>Expression2</tt> can be a string, an (un)ordered list of string value(s), or an expression. In the last case, the given expression should be evaluable into one of the first two types, i.e., into a string value or an (un)ordered list of string value(s).</p>
-<p>The following examples are all valid expressions.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound&quot;)
-   ... where ftcontains($msg.message-text, &quot;sound&quot;, {&quot;mode&quot;:&quot;any&quot;})
-   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
-   ... where ftcontains($msg.message-text, {{&quot;speed&quot;, &quot;stand&quot;, &quot;customization&quot;}}, {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, let $keyword_list := [&quot;voice&quot;, &quot;system&quot;] return $keyword_list, {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, $keyword_list, {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>In the last example above, <tt>$keyword_list</tt> should evaluate to a string or an (un)ordered list of string value(s).</p>
-<p>The last <tt>FullTextOption</tt> parameter clarifies the given FTS request. If you omit the <tt>FullTextOption</tt> parameter, then the default value will be set for each possible option. Currently, we only have one option named <tt>mode</tt>. And as we extend the FTS feature, more options will be added. Please note that the format of <tt>FullTextOption</tt> is a record, thus you need to put the option(s) in a record <tt>{}</tt>. The <tt>mode</tt> option indicates whether the given FTS query is a conjunctive (AND) or disjunctive (OR) search request. This option can be either <tt>&#x201c;any&#x201d;</tt> or <tt>&#x201c;all&#x201d;</tt>. The default value for <tt>mode</tt> is <tt>&#x201c;all&#x201d;</tt>. If one specifies <tt>&#x201c;any&#x201d;</tt>, a disjunctive search will be conducted. For example, the following query will find documents whose <tt>message-text</tt> field contains &#x201c;sound&#x201d; or &#x201c;system&#x201d;, so a document will be returned if it contains eit
 her &#x201c;sound&#x201d;, &#x201c;system&#x201d;, or both of the keywords.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>The other option parameter,<tt>&#x201c;all&#x201d;</tt>, specifies a conjunctive search. The following examples will find the documents whose <tt>message-text</tt> field contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;. If a document contains only &#x201c;sound&#x201d; or &#x201c;system&#x201d; but not both, it will not be returned.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
-</pre></div></div>
-
-<p>Currently AsterixDB doesn&#x2019;t (yet) support phrase searches, so the following query will not work.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound system&quot;, {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>As a workaround solution, the following query can be used to achieve a roughly similar goal. The difference is that the following queries will find documents where <tt>$msg.message-text</tt> contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;, but the order and adjacency of &#x201c;sound&#x201d; and &#x201c;system&#x201d; are not checked, unlike in a phrase search. As a result, the query below would also return documents with &#x201c;sound system can be installed.&#x201d;, &#x201c;system sound is perfect.&#x201d;, or &#x201c;sound is not clear. You may need to install a new system.&#x201d;</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
-</pre></div></div>
-</div>
-<div class="section">
-<h2><a name="Creating_and_utilizing_a_Full-text_index_.5BBack_to_TOC.5D"></a><a name="FulltextIndex" id="FulltextIndex">Creating and utilizing a Full-text index</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>When there is a full-text index on the field that is being searched, rather than scanning all records, AsterixDB can utilize that index to expedite the execution of a FTS query. To create a full-text index, you need to specify the index type as <tt>fulltext</tt> in your DDL statement. For instance, the following DDL statement create a full-text index on the TweetMessages.message-text attribute.</p>
-
-<div>
-<div>
-<pre class="source">create index messageFTSIdx on TweetMessages(message-text) type fulltext;
-</pre></div></div></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/js-sdk.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/js-sdk.html b/content/docs/0.9.4/aql/js-sdk.html
index 50700e9..c5902e4 100644
--- a/content/docs/0.9.4/aql/js-sdk.html
+++ b/content/docs/0.9.4/aql/js-sdk.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/js-sdk.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/js-sdk.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB Javascript SDK</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/manual.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/manual.html b/content/docs/0.9.4/aql/manual.html
index 7a45391..ce8e842 100644
--- a/content/docs/0.9.4/aql/manual.html
+++ b/content/docs/0.9.4/aql/manual.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/manual.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/manual.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; The Asterix Query Language, Version 1.0</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li class="active"><a href="#"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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 class="active"><a href="#"><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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/primer.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/primer.html b/content/docs/0.9.4/aql/primer.html
index 46918a7..36d59dd 100644
--- a/content/docs/0.9.4/aql/primer.html
+++ b/content/docs/0.9.4/aql/primer.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/primer.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/primer.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB 101: An ADM and AQL Primer</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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 class="active"><a href="#"><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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/similarity.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/similarity.html b/content/docs/0.9.4/aql/similarity.html
deleted file mode 100644
index ff71fcf..0000000
--- a/content/docs/0.9.4/aql/similarity.html
+++ /dev/null
@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/similarity.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; AsterixDB  Support of Similarity Queries</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Support of Similarity Queries</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>AsterixDB  Support of Similarity Queries</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="#Motivation">Motivation</a></li>
-<li><a href="#DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a></li>
-<li><a href="#SimilaritySelectionQueries">Similarity Selection Queries</a></li>
-<li><a href="#SimilarityJoinQueries">Similarity Join Queries</a></li>
-<li><a href="#UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a></li>
-</ul></div>
-<div class="section">
-<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>Similarity queries are widely used in applications where users need to find objects that satisfy a similarity predicate, while exact matching is not sufficient. These queries are especially important for social and Web applications, where errors, abbreviations, and inconsistencies are common.  As an example, we may want to find all the movies starring Schwarzenegger, while we don&#x2019;t know the exact spelling of his last name (despite his popularity in both the movie industry and politics :-)). As another example, we want to find all the Facebook users who have similar friends. To meet this type of needs, AsterixDB supports similarity queries using efficient indexes and algorithms.</p></div>
-<div class="section">
-<h2><a name="Data_Types_and_Similarity_Functions_.5BBack_to_TOC.5D"></a><a name="DataTypesAndSimilarityFunctions" id="DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>AsterixDB supports <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> (on strings) and <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a> (on sets).  For instance, in our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, the <tt>friend-ids</tt> of a Facebook user forms a set of friends, and we can define a similarity between the sets of friends of two users. We can also convert a string to a set of grams of a length &#x201c;n&#x201d; (called &#x201c;n-grams&#x201d;) and define the Jaccard similarity between the two gram sets of the two strings. Formally, the &#x201c;n-grams&#x201d; of a string are its substrings of length &#x201c;n&#x201d;. For instance, the 3-grams of the string <tt>schwarzenegger</tt> are <tt>sch</tt>, <tt>chw</tt>, <tt>hwa</tt>, &#x2026;, <tt>ger</tt>.</p>
-<p>AsterixDB provides <a href="functions.html#Tokenizing_Functions">tokenization functions</a> to convert strings to sets, and the <a href="functions.html#Similarity_Functions">similarity functions</a>.</p></div>
-<div class="section">
-<h2><a name="Similarity_Selection_Queries_.5BBack_to_TOC.5D"></a><a name="SimilaritySelectionQueries" id="SimilaritySelectionQueries">Similarity Selection Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>The following query asks for all the Facebook users whose name is similar to <tt>Suzanna Tilson</tt>, i.e., their edit distance is at most 2.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
-    where $ed &lt;= 2
-    return $user
-</pre></div></div>
-
-<p>The following query asks for all the Facebook users whose set of friend ids is similar to <tt>[1,5,9,10]</tt>, i.e., their Jaccard similarity is at least 0.6.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
-    where $sim &gt;= 0.6f
-    return $user
-</pre></div></div>
-
-<p>AsterixDB allows a user to use a similarity operator <tt>~=</tt> to express a condition by defining the similarity function and threshold using &#x201c;set&#x201d; statements earlier. For instance, the above query can be equivalently written as:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    set simfunction &quot;jaccard&quot;;
-    set simthreshold &quot;0.6f&quot;;
-
-    for $user in dataset('FacebookUsers')
-    where $user.friend-ids ~= [1,5,9,10]
-    return $user
-</pre></div></div>
-
-<p>In this query, we first declare Jaccard as the similarity function using <tt>simfunction</tt> and then specify the threshold <tt>0.6f</tt> using <tt>simthreshold</tt>.</p></div>
-<div class="section">
-<h2><a name="Similarity_Join_Queries_.5BBack_to_TOC.5D"></a><a name="SimilarityJoinQueries" id="SimilarityJoinQueries">Similarity Join Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>AsterixDB supports fuzzy joins between two sets. The following <a href="primer.html#Query_5_-_Fuzzy_Join">query</a> finds, for each Facebook user, all Twitter users with names similar to their name based on the edit distance.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    set simfunction &quot;edit-distance&quot;;
-    set simthreshold &quot;3&quot;;
-
-    for $fbu in dataset FacebookUsers
-    return {
-        &quot;id&quot;: $fbu.id,
-        &quot;name&quot;: $fbu.name,
-        &quot;similar-users&quot;: for $t in dataset TweetMessages
-                            let $tu := $t.user
-                            where $tu.name ~= $fbu.name
-                            return {
-                            &quot;twitter-screenname&quot;: $tu.screen-name,
-                            &quot;twitter-name&quot;: $tu.name
-                            }
-    };
-</pre></div></div>
-</div>
-<div class="section">
-<h2><a name="Using_Indexes_to_Support_Similarity_Queries_.5BBack_to_TOC.5D"></a><a name="UsingIndexesToSupportSimilarityQueries" id="UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>AsterixDB uses two types of indexes to support similarity queries, namely &#x201c;ngram index&#x201d; and &#x201c;keyword index&#x201d;.</p>
-<div class="section">
-<h3><a name="NGram_Index"></a>NGram Index</h3>
-<p>An &#x201c;ngram index&#x201d; is constructed on a set of strings.  We generate n-grams for each string, and build an inverted list for each n-gram that includes the ids of the strings with this gram.  A similarity query can be answered efficiently by accessing the inverted lists of the grams in the query and counting the number of occurrences of the string ids on these inverted lists.  The similar idea can be used to answer queries with Jaccard similarity.  A detailed description of these techniques is available at this <a class="externalLink" href="http://www.ics.uci.edu/~chenli/pub/icde2009-memreducer.pdf">paper</a>.</p>
-<p>For instance, the following DDL statements create an ngram index on the <tt>FacebookUsers.name</tt> attribute using an inverted index of 3-grams.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    create index fbUserIdx on FacebookUsers(name) type ngram(3);
-</pre></div></div>
-
-<p>The number &#x201c;3&#x201d; in &#x201c;ngram(3)&#x201d; is the length &#x201c;n&#x201d; in the grams. This index can be used to optimize similarity queries on this attribute using <a href="functions.html#edit-distance">edit-distance</a>, <a href="functions.html#edit-distance-check">edit-distance-check</a>, <a href="functions.html#similarity-jaccard">similarity-jaccard</a>, or <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a> queries on this attribute where the similarity is defined on sets of 3-grams.  This index can also be used to optimize queries with the &#x201c;<a href="(functions.html#contains">contains()</a>&#x201d; predicate (i.e., substring matching) since it can be also be solved by counting on the inverted lists of the grams in the query string.</p>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_edit-distance"></a>NGram Index usage case - <a href="functions.html#edit-distance">edit-distance</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
-    where $ed &lt;= 2
-    return $user
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_edit-distance-check"></a>NGram Index usage case - <a href="functions.html#edit-distance-check">edit-distance-check</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
-    where $ed[0]
-    return $ed[1]
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_similarity-jaccard"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard">similarity-jaccard</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
-    where $sim &gt;= 0.6f
-    return $user
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_similarity-jaccard-check"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
-    where $sim[0]
-    return $user
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_contains.28.29"></a>NGram Index usage case - <a href="(functions.html#contains">contains()</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $i in dataset('FacebookMessages')
-    where contains($i.message, &quot;phone&quot;)
-    return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
-</pre></div></div>
-</div></div>
-<div class="section">
-<h3><a name="Keyword_Index"></a>Keyword Index</h3>
-<p>A &#x201c;keyword index&#x201d; is constructed on a set of strings or sets (e.g., OrderedList, UnorderedList). Instead of generating grams as in an ngram index, we generate tokens (e.g., words) and for each token, construct an inverted list that includes the ids of the objects with this token.  The following two examples show how to create keyword index on two different types:</p>
-<div class="section">
-<h4><a name="Keyword_Index_on_String_Type"></a>Keyword Index on String Type</h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    drop index FacebookMessages.fbMessageIdx if exists;
-    create index fbMessageIdx on FacebookMessages(message) type keyword;
-
-    for $o in dataset('FacebookMessages')
-    let $jacc := similarity-jaccard-check(word-tokens($o.message), word-tokens(&quot;love like ccast&quot;), 0.2f)
-    where $jacc[0]
-    return $o
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="Keyword_Index_on_UnorderedList_Type"></a>Keyword Index on UnorderedList Type</h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    create index fbUserIdx_fids on FacebookUsers(friend-ids) type keyword;
-
-    for $c in dataset('FacebookUsers')
-    let $jacc := similarity-jaccard-check($c.friend-ids, {{3,10}}, 0.5f)
-    where $jacc[0]
-    return $c
-</pre></div></div>
-
-<p>As shown above, keyword index can be used to optimize queries with token-based similarity predicates, including <a href="functions.html#similarity-jaccard">similarity-jaccard</a> and <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a>.</p></div></div></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aws.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aws.html b/content/docs/0.9.4/aws.html
new file mode 100644
index 0000000..977e782
--- /dev/null
+++ b/content/docs/0.9.4/aws.html
@@ -0,0 +1,384 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/aws.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; Installation using Amazon Web Services</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 class="active"><a href="#"><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><a href="sqlpp/builtins.html" title="Builtin Functions"><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>Installation using Amazon Web Services</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+<ul>
+
+<li><a href="#Introduction">Introduction</a></li>
+<li><a href="#Prerequisites">Prerequisites</a></li>
+<li><a href="#config">Cluster Configuration</a></li>
+<li><a href="#lifecycle">Cluster Lifecycle Management</a></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">
+<h2><a name="Introduction" id="Introduction">Introduction</a></h2>
+<p>Note that you can always manually launch a number of Amazon Web Services EC2 instances and then run the Ansible cluster installation scripts as described <a href="ansible.html">here</a> separately to manage the lifecycle of an AsterixDB cluster on those EC2 instances.</p>
+<p>However, via this installation option, we provide a combo solution for automating both AWS EC2 and AsterixDB, where you can run only one script to deploy, start, stop, and terminate an AsterixDB cluster on AWS.</p></div>
+<div class="section">
+<h2><a name="Prerequisites" id="Prerequisites">Prerequisites</a></h2>
+<ul>
+
+<li>
+
+<p>Supported operating systems for the client: <b>Linux</b> and <b>MacOS</b></p>
+</li>
+<li>
+
+<p>Supported operating systems for Amazon Web Services instances: <b>Linux</b></p>
+</li>
+<li>
+
+<p>Install pip on your client machine:</p>
+<p>CentOS</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo yum install python-pip
+</pre></div></div>
+
+<p>Ubuntu</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo apt-get install python-pip
+</pre></div></div>
+
+<p>macOS</p>
+
+<div>
+<div>
+<pre class="source"> $ brew install pip
+</pre></div></div>
+</li>
+<li>
+
+<p>Install Ansible, boto, and boto3 on your client machine:</p>
+
+<div>
+<div>
+<pre class="source"> $ pip install ansible
+ $ pip install boto
+ $ pip install boto3
+</pre></div></div>
+
+<p>Note that you might need <tt>sudo</tt> depending on your system configuration.</p>
+<p><b>Make sure that the version of Ansible is no less than 2.2.1.0</b>:</p>
+
+<div>
+<div>
+<pre class="source"> $ ansible --version
+ ansible 2.2.1.0
+</pre></div></div>
+
+<p><b>For users with macOS 10.11+</b>, please create a user-level Ansible configuration file at:</p>
+
+<div>
+<div>
+<pre class="source"> ~/.ansible.cfg
+</pre></div></div>
+
+<p>and add the following configuration:</p>
+
+<div>
+<div>
+<pre class="source"> [ssh_connection]
+ control_path = %(directory)s/%%C
+</pre></div></div>
+</li>
+<li>
+
+<p>Download the AsterixDB distribution package, unzip it, navigate to <tt>opt/aws/</tt></p>
+
+<div>
+<div>
+<pre class="source"> $ cd opt/aws
+</pre></div></div>
+
+<p>The following files and directories are in the directory <tt>opt/aws</tt>:</p>
+
+<div>
+<div>
+<pre class="source"> README  bin  conf  yaml
+</pre></div></div>
+
+<p><tt>bin</tt> contains scripts that start and terminate an AWS-based cluster instance, according to the configuration specified in files under <tt>conf</tt>, and <tt>yaml</tt> contains internal Ansible scripts that the shell scripts in <tt>bin</tt> use.</p>
+</li>
+<li>
+
+<p>Create an AWS account and an IAM user.</p>
+<p>Set up a security group that you&#x2019;d like to use for your AWS cluster. <b>The security group should at least allow all TCP connections from anywhere.</b> Provide the name of the security group as the value for the <tt>group</tt> field in <tt>conf/aws_settings.yml</tt>.</p>
+</li>
+<li>
+
+<p>Retrieve your AWS EC2 key pair name and use that as the <tt>keypair</tt> in <tt>conf/aws_settings.yml</tt>;</p>
+<p>retrieve your AWS IAM <tt>access key ID</tt> and use that as the <tt>access_key_id</tt> in <tt>conf/aws_settings.yml</tt>;</p>
+<p>retrieve your AWS IAM <tt>secret access key</tt> and use that as the <tt>secret_access_key</tt> in <tt>conf/aws_settings.yml</tt>.</p>
+<p>Note that you can only read or download <tt>access key ID</tt> and <tt>secret access key</tt> once from your AWS console. If you forget them, you have to create new keys and delete the old ones.</p>
+</li>
+<li>
+
+<p>Configure your ssh setting by editing <tt>~/.ssh/config</tt> and adding the following entry:</p>
+
+<div>
+<div>
+<pre class="source"> Host *.amazonaws.com
+      IdentityFile &lt;path_of_private_key&gt;
+</pre></div></div>
+
+<p>Note that &lt;path_of_private_key&gt; should be replaced by the path to the file that stores the private key for the key pair that you uploaded to AWS and used in <tt>conf/aws_settings</tt>. For example:</p>
+
+<div>
+<div>
+<pre class="source"> Host *.amazonaws.com
+      IdentityFile ~/.ssh/id_rsa
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Configuration"></a><a name="config" id="config">Cluster Configuration</a></h2>
+<ul>
+
+<li>
+
+<p><b>AWS settings</b>.  Edit <tt>conf/instance_settings.yml</tt>. The meaning of each parameter is listed as follows:</p>
+
+<div>
+<div>
+<pre class="source"> # The OS image id for ec2 instances.
+ image: ami-76fa4116
+
+ # The data center region for ec2 instances.
+ region: us-west-2
+
+ # The tag for each ec2 machine. Use different tags for isolation.
+ tag: scale_test
+
+ # The name of a security group that appears in your AWS console.
+ group: default
+
+ # The name of a key pair that appears in your AWS console.
+ keypair: &lt;to be filled&gt;
+
+ # The AWS access key id for your IAM user.
+ access_key_id: &lt;to be filled&gt;
+
+ # The AWS secret key for your IAM user.
+ secret_access_key: &lt;to be filled&gt;
+
+ # The AWS instance type. A full list of available types are listed at:
+ # https://aws.amazon.com/ec2/instance-types/
+ instance_type: t2.micro
+
+ # The number of ec2 instances that construct a cluster.
+ count: 3
+
+ # The user name.
+ user: ec2-user
+
+ # Whether to reuse one slave machine to host the master process.
+ cc_on_nc: false
+</pre></div></div>
+
+<p><b>As described in <a href="#Prerequisites">prerequisites</a>, the following parameters must be customized:</b></p>
+
+<div>
+<div>
+<pre class="source"> # The tag for each ec2 machine. Use different tags for isolation.
+ tag: scale_test
+
+ # The name of a security group that appears in your AWS console.
+ group: default
+
+ # The name of a key pair that appears in your AWS console.
+ keypair: &lt;to be filled&gt;
+
+ # The AWS access key id for your IAM user.
+ access_key_id: &lt;to be filled&gt;
+
+ # The AWS secrety key for your IAM user.
+ secret_access_key: &lt;to be filled&gt;
+</pre></div></div>
+</li>
+<li>
+
+<p><b>Remote working directories</b>. Edit <tt>conf/instance_settings.yml</tt> to change the remote binary directory (the variable &#x201c;binarydir&#x201d;) when necessary. By default, the binary directory will be under the home directory (as the value of Ansible builtin variable ansible_env.HOME) of the ssh user account on each node.</p>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Lifecycle_Management"></a><a name="lifecycle" id="lifecycle">Cluster Lifecycle Management</a></h2>
+<ul>
+
+<li>
+
+<p>Allocate AWS EC2 nodes (the number of nodes is specified in <tt>conf/instance_settings.yml</tt>) and deploy the binary to all allocated EC2 nodes:</p>
+
+<div>
+<div>
+<pre class="source"> bin/deploy.sh
+</pre></div></div>
+</li>
+<li>
+
+<p>Before starting the AsterixDB cluster, you the instance configuration file <tt>conf/instance/cc.conf</tt> can be modified with the exception of the IP addresses/DNS names which are are generated and cannot be changed. All available parameters and their usage can be found <a href="ncservice.html#Parameters">here</a>.</p>
+</li>
+<li>
+
+<p>Launch your AsterixDB cluster on EC2:</p>
+
+<div>
+<div>
+<pre class="source"> bin/start.sh
+</pre></div></div>
+
+<p>Now you can use the multi-node AsterixDB cluster on EC2 by by opening the master node listed in <tt>conf/instance/inventory</tt> at port <tt>19001</tt> (which can be customized in <tt>conf/instance/cc.conf</tt>) in your browser.</p>
+</li>
+<li>
+
+<p>If you want to stop the AWS-based AsterixDB cluster, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> bin/stop.sh
+</pre></div></div>
+
+<p>Note that this only stops AsterixDB but does not stop the EC2 nodes.</p>
+</li>
+<li>
+
+<p>If you want to terminate the EC2 nodes that run the AsterixDB cluster, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> bin/terminate.sh
+</pre></div></div>
+
+<p><b>Note that it will destroy everything in the AsterixDB cluster you installed and terminate all EC2 nodes for the cluster.</b></p>
+</li>
+</ul></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>


[17/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
fix missing docs and url

Change-Id:Ied2b685f015e0f35563ebd0510231a5d663494f5
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2995
Reviewed-by: Ian Maxon <im...@apache.org>


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

Branch: refs/heads/asf-site
Commit: b2f1d3e6d45bdf38351b1dedd8781f5c4fb3e9ce
Parents: d00eca8
Author: Ian Maxon <ia...@maxons.email>
Authored: Fri Oct 12 14:42:34 2018 -0700
Committer: Ian Maxon <im...@apache.org>
Committed: Fri Oct 12 14:47:02 2018 -0700

----------------------------------------------------------------------
 _config.yml                                |    2 +-
 content/dev-setup.html                     |    2 +-
 content/docs/0.9.4/ansible.html            |  293 +
 content/docs/0.9.4/api.html                |   28 +-
 content/docs/0.9.4/aql/builtins.html       | 8927 +++++++++++++++++++++++
 content/docs/0.9.4/aql/externaldata.html   |   28 +-
 content/docs/0.9.4/aql/filters.html        |  142 -
 content/docs/0.9.4/aql/fulltext.html       |  208 -
 content/docs/0.9.4/aql/js-sdk.html         |   28 +-
 content/docs/0.9.4/aql/manual.html         |   28 +-
 content/docs/0.9.4/aql/primer.html         |   28 +-
 content/docs/0.9.4/aql/similarity.html     |  310 -
 content/docs/0.9.4/aws.html                |  384 +
 content/docs/0.9.4/csv.html                |   28 +-
 content/docs/0.9.4/datamodel.html          |  778 ++
 content/docs/0.9.4/feeds.html              |  468 ++
 content/docs/0.9.4/feeds/tutorial.html     |  450 --
 content/docs/0.9.4/index.html              |   28 +-
 content/docs/0.9.4/ncservice.html          |   29 +-
 content/docs/0.9.4/overview.html           |   28 +-
 content/docs/0.9.4/sqlpp/builtins.html     | 8927 +++++++++++++++++++++++
 content/docs/0.9.4/sqlpp/filters.html      |  142 +
 content/docs/0.9.4/sqlpp/fulltext.html     |  208 +
 content/docs/0.9.4/sqlpp/manual.html       | 4215 +++++++++++
 content/docs/0.9.4/sqlpp/primer-sqlpp.html |   26 +-
 content/docs/0.9.4/sqlpp/similarity.html   |  310 +
 content/docs/0.9.4/udf.html                |  213 +-
 docs/0.9.4/ansible.html                    |  293 +
 docs/0.9.4/api.html                        |   28 +-
 docs/0.9.4/aql/builtins.html               | 8927 +++++++++++++++++++++++
 docs/0.9.4/aql/externaldata.html           |   28 +-
 docs/0.9.4/aql/filters.html                |  142 -
 docs/0.9.4/aql/fulltext.html               |  208 -
 docs/0.9.4/aql/js-sdk.html                 |   28 +-
 docs/0.9.4/aql/manual.html                 |   28 +-
 docs/0.9.4/aql/primer.html                 |   28 +-
 docs/0.9.4/aql/similarity.html             |  310 -
 docs/0.9.4/aws.html                        |  384 +
 docs/0.9.4/csv.html                        |   28 +-
 docs/0.9.4/datamodel.html                  |  778 ++
 docs/0.9.4/feeds.html                      |  468 ++
 docs/0.9.4/feeds/tutorial.html             |  450 --
 docs/0.9.4/index.html                      |   28 +-
 docs/0.9.4/ncservice.html                  |   29 +-
 docs/0.9.4/overview.html                   |   28 +-
 docs/0.9.4/sqlpp/builtins.html             | 8927 +++++++++++++++++++++++
 docs/0.9.4/sqlpp/filters.html              |  142 +
 docs/0.9.4/sqlpp/fulltext.html             |  208 +
 docs/0.9.4/sqlpp/manual.html               | 4215 +++++++++++
 docs/0.9.4/sqlpp/primer-sqlpp.html         |   26 +-
 docs/0.9.4/sqlpp/similarity.html           |  310 +
 docs/0.9.4/udf.html                        |  213 +-
 52 files changed, 49812 insertions(+), 2700 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/_config.yml
----------------------------------------------------------------------
diff --git a/_config.yml b/_config.yml
index e1eb181..0d595ce 100644
--- a/_config.yml
+++ b/_config.yml
@@ -4,7 +4,7 @@ name: "Apache AsterixDB"
 STABLE_VERSION: 0.9.4
 UNSTABLE_VERSION: 0.9.5-SNAPSHOT
 STABLE_NCSERVICE_URL: "http://www.apache.org/dyn/closer.lua/asterixdb/asterixdb-0.9.4/apache-asterixdb-0.9.4.zip"
-UNSTABLE_NCSERVICE_URL: "https://asterix-jenkins.ics.uci.edu/job/asterix-integration-tests/lastSuccessfulBuild/org.apache.asterix$asterix-server/artifact/org.apache.asterix/asterix-server/0.9.5-SNAPSHOT/apache-asterixdb-0.9.5-SNAPSHOT.zip"
+UNSTABLE_NCSERVICE_URL: "https://asterix-jenkins.ics.uci.edu/job/asterix-integration-tests/lastSuccessfulBuild/org.apache.asterix$asterix-server/artifact/org.apache.asterix/asterix-server/0.9.5-SNAPSHOT/asterix-server-0.9.5-SNAPSHOT-binary-assembly.zip"
 DOCS_BASE_URL: "docs"
 UNSTABLE_DOCS_BASE_URL: "https://ci.apache.org/projects/asterixdb/"
 

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/dev-setup.html
----------------------------------------------------------------------
diff --git a/content/dev-setup.html b/content/dev-setup.html
index 7b68e14..6d27a24 100644
--- a/content/dev-setup.html
+++ b/content/dev-setup.html
@@ -146,7 +146,7 @@ A great way to start contributing is to pick a bug labelled starter in JIRA and
 <p>If you are a developer simply looking for a snapshot of the latest development version of AsterixDB to test out your application that is based on top of AsterixDB, snapshots from the latest successful push to our master branch are available below. These are non ASF-release, automatic builds.</p>
 
 <h3 id="server-package">Server Package</h3>
-<p><a class="btn btn-md btn-warning" href="https://asterix-jenkins.ics.uci.edu/job/asterix-integration-tests/lastSuccessfulBuild/org.apache.asterix$asterix-server/artifact/org.apache.asterix/asterix-server/0.9.5-SNAPSHOT/apache-asterixdb-0.9.5-SNAPSHOT.zip" role="button">Download AsterixDB 0.9.5-SNAPSHOT <i class="fa fa-download fa-lg"></i> </a></p>
+<p><a class="btn btn-md btn-warning" href="https://asterix-jenkins.ics.uci.edu/job/asterix-integration-tests/lastSuccessfulBuild/org.apache.asterix$asterix-server/artifact/org.apache.asterix/asterix-server/0.9.5-SNAPSHOT/asterix-server-0.9.5-SNAPSHOT-binary-assembly.zip" role="button">Download AsterixDB 0.9.5-SNAPSHOT <i class="fa fa-download fa-lg"></i> </a></p>
 
 <hr />
 

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/ansible.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/ansible.html b/content/docs/0.9.4/ansible.html
new file mode 100644
index 0000000..4722841
--- /dev/null
+++ b/content/docs/0.9.4/ansible.html
@@ -0,0 +1,293 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/ansible.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; Installation using Ansible</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 class="active"><a href="#"><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><a href="sqlpp/builtins.html" title="Builtin Functions"><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>Installation using Ansible</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+<ul>
+
+<li><a href="#Introduction">Introduction</a></li>
+<li><a href="#Prerequisites">Prerequisites</a></li>
+<li><a href="#config">Cluster Configuration</a></li>
+<li><a href="#lifecycle">Cluster Lifecycle Management</a></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">
+<h2><a name="Introduction" id="Introduction">Introduction</a></h2>
+<p>This installation option provides several wrapped <a class="externalLink" href="https://www.ansible.com/">Ansible</a>-based scripts to deploy, start, stop, and erase an AsterixDB instance on a multi-node cluster without requiring users to interact with each individual node in the cluster.</p></div>
+<div class="section">
+<h2><a name="Prerequisites" id="Prerequisites">Prerequisites</a></h2>
+<ul>
+
+<li>
+
+<p>Supported operating systems: <b>Linux</b> and <b>MacOS</b></p>
+</li>
+<li>
+
+<p>Install pip on your client machine:</p>
+<p>CentOS</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo yum install python-pip
+</pre></div></div>
+
+<p>Ubuntu</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo apt-get install python-pip
+</pre></div></div>
+
+<p>macOS</p>
+
+<div>
+<div>
+<pre class="source"> $ brew install pip
+</pre></div></div>
+</li>
+<li>
+
+<p>Install Ansible, boto, and boto3 on your client machine:</p>
+
+<div>
+<div>
+<pre class="source"> $ pip install ansible
+ $ pip install boto
+ $ pip install boto3
+</pre></div></div>
+
+<p>Note that you might need <tt>sudo</tt> depending on your system configuration.</p>
+<p><b>Make sure that the version of Ansible is no less than 2.2.1.0</b>:</p>
+
+<div>
+<div>
+<pre class="source"> $ ansible --version
+ ansible 2.2.1.0
+</pre></div></div>
+</li>
+<li>
+
+<p>Download the AsterixDB distribution package, unzip it, and navigate to <tt>opt/ansible/</tt></p>
+
+<div>
+<div>
+<pre class="source"> $ cd opt/ansible
+</pre></div></div>
+
+<p>The following files and directories are in the directory <tt>opt/ansible</tt>:</p>
+
+<div>
+<div>
+<pre class="source"> README  bin  conf  yaml
+</pre></div></div>
+
+<p><tt>bin</tt> contains scripts that deploy, start, stop and erase a multi-node AsterixDB cluster, according to the configuration specified in files under <tt>conf</tt>, and <tt>yaml</tt> contains internal Ansible scripts that the shell scripts in <tt>bin</tt> use.</p>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Configuration"></a><a name="config" id="config">Cluster Configuration</a></h2>
+<ul>
+
+<li>
+
+<p><b>Nodes and account</b>. Edit the inventory file <tt>conf/inventory</tt> when necessary. You mostly only need to specify the node DNS names (or IPs) for the cluster controller, i.e., the master node, in the <b>[cc]</b> section, and node controllers, i.e., slave nodes, in the <b>[ncs]</b> section. The following example configures a cluster with two slave nodes (172.0.1.11 and 172.0.1.12) and one master node (172.0.1.10).</p>
+
+<div>
+<div>
+<pre class="source"> [cc]
+ 172.0.1.10
+
+ [ncs]
+ 172.0.1.11
+ 172.0.1.12
+</pre></div></div>
+
+<p><b>Configure passwordless ssh from your current client that runs the scripts to all nodes listed in <tt>conf/inventory</tt> as well as <tt>localhost</tt>.</b> If the ssh user account for target machines is different from your current username, please uncomment and edit the following two lines:</p>
+
+<div>
+<div>
+<pre class="source"> ;[all:vars]
+ ;ansible_ssh_user=&lt;fill with your ssh account username&gt;
+</pre></div></div>
+
+<p>If you want to specify advanced Ansible builtin variables, please refer to the <a class="externalLink" href="http://docs.ansible.com/ansible/intro_inventory.html">Ansible documentation</a>.</p>
+</li>
+<li>
+
+<p><b>Remote working directories</b>. Edit <tt>conf/instance_settings.yml</tt> to change the remote binary directory (the variable &#x201c;binarydir&#x201d;) when necessary. By default, the binary directory will be under the home directory (as the value of Ansible builtin variable ansible_env.HOME) of the ssh user account on each node.</p>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Lifecycle_Management"></a><a name="lifecycle" id="lifecycle">Cluster Lifecycle Management</a></h2>
+<ul>
+
+<li>
+
+<p>Deploy the binary to all nodes:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/deploy.sh
+</pre></div></div>
+</li>
+<li>
+
+<p>Every time before starting the AsterixDB cluster, you can edit the instance configuration file <tt>conf/instance/cc.conf</tt>, except that IP addresses/DNS names are generated and cannot be changed. All available parameters and their usage can be found <a href="ncservice.html#Parameters">here</a>.</p>
+</li>
+<li>
+
+<p>Launch your AsterixDB cluster:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/start.sh
+</pre></div></div>
+
+<p>Now you can use the multi-node AsterixDB cluster by opening the master node listed in <tt>conf/inventory</tt> at port <tt>19001</tt> (which can be customized in <tt>conf/instance/cc.conf</tt>) in your browser.</p>
+</li>
+<li>
+
+<p>If you want to stop the the multi-node AsterixDB cluster, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/stop.sh
+</pre></div></div>
+</li>
+<li>
+
+<p>If you want to remove the binary on all nodes, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/erase.sh
+</pre></div></div>
+</li>
+</ul></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/api.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/api.html b/content/docs/0.9.4/api.html
index f1d98be..2de7ec2 100644
--- a/content/docs/0.9.4/api.html
+++ b/content/docs/0.9.4/api.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/api.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/api.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; HTTP API to AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
       <li class="nav-header">API/SDK</li>
     <li class="active"><a href="#"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">


[16/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/aql/builtins.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/aql/builtins.html b/content/docs/0.9.4/aql/builtins.html
new file mode 100644
index 0000000..43116f4
--- /dev/null
+++ b/content/docs/0.9.4/aql/builtins.html
@@ -0,0 +1,8927 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/aql/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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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_radius</h3>
+<ul>
+
+<li

<TRUNCATED>

[10/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/sqlpp/manual.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/sqlpp/manual.html b/content/docs/0.9.4/sqlpp/manual.html
new file mode 100644
index 0000000..8d8b5df
--- /dev/null
+++ b/content/docs/0.9.4/sqlpp/manual.html
@@ -0,0 +1,4215 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/sqlpp/manual.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; The SQL++ Query Language</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 class="active"><a href="#"><span class="none"></span>The SQL++ Query Language</a></li>
+    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><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>The SQL++ Query Language</h1>
+<ul>
+
+<li><a href="#Introduction">1. Introduction</a></li>
+<li><a href="#Expressions">2. Expressions</a>
+<ul>
+
+<li><a href="#Operator_expressions">Operator Expressions</a>
+<ul>
+
+<li><a href="#Arithmetic_operators">Arithmetic Operators</a></li>
+<li><a href="#Collection_operators">Collection Operators</a></li>
+<li><a href="#Comparison_operators">Comparison Operators</a></li>
+<li><a href="#Logical_operators">Logical Operators</a></li>
+</ul>
+</li>
+<li><a href="#Case_expressions">Case Expressions</a></li>
+<li><a href="#Quantified_expressions">Quantified Expressions</a></li>
+<li><a href="#Path_expressions">Path Expressions</a></li>
+<li><a href="#Primary_expressions">Primary Expressions</a>
+<ul>
+
+<li><a href="#Literals">Literals</a></li>
+<li><a href="#Variable_references">Variable References</a></li>
+<li><a href="#Parenthesized_expressions">Parenthesized Expressions</a></li>
+<li><a href="#Function_call_expressions">Function call Expressions</a></li>
+<li><a href="#Constructors">Constructors</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#Queries">3. Queries</a>
+<ul>
+
+<li><a href="#Declarations">Declarations</a></li>
+<li><a href="#SELECT_statements">SELECT Statements</a></li>
+<li><a href="#Select_clauses">SELECT Clauses</a>
+<ul>
+
+<li><a href="#Select_element">Select Element/Value/Raw</a></li>
+<li><a href="#SQL_select">SQL-style Select</a></li>
+<li><a href="#Select_star">Select *</a></li>
+<li><a href="#Select_distinct">Select Distinct</a></li>
+<li><a href="#Unnamed_projections">Unnamed Projections</a></li>
+<li><a href="#Abbreviated_field_access_expressions">Abbreviated Field Access Expressions</a></li>
+</ul>
+</li>
+<li><a href="#Unnest_clauses">UNNEST Clauses</a>
+<ul>
+
+<li><a href="#Inner_unnests">Inner Unnests</a></li>
+<li><a href="#Left_outer_unnests">Left Outer Unnests</a></li>
+<li><a href="#Expressing_joins_using_unnests">Expressing Joins Using Unnests</a></li>
+</ul>
+</li>
+<li><a href="#From_clauses">FROM clauses</a>
+<ul>
+
+<li><a href="#Binding_expressions">Binding Expressions</a></li>
+<li><a href="#Multiple_from_terms">Multiple From Terms</a></li>
+<li><a href="#Expressing_joins_using_from_terms">Expressing Joins Using From Terms</a></li>
+<li><a href="#Implicit_binding_variables">Implicit Binding Variables</a></li>
+</ul>
+</li>
+<li><a href="#Join_clauses">JOIN Clauses</a>
+<ul>
+
+<li><a href="#Inner_joins">Inner Joins</a></li>
+<li><a href="#Left_outer_joins">Left Outer Joins</a></li>
+</ul>
+</li>
+<li><a href="#Group_By_clauses">GROUP BY Clauses</a>
+<ul>
+
+<li><a href="#Group_variables">Group Variables</a></li>
+<li><a href="#Implicit_group_key_variables">Implicit Group Key Variables</a></li>
+<li><a href="#Implicit_group_variables">Implicit Group Variables</a></li>
+<li><a href="#Aggregation_functions">Aggregation Functions</a></li>
+<li><a href="#SQL-92_aggregation_functions">SQL-92 Aggregation Functions</a></li>
+<li><a href="#SQL-92_compliant_gby">SQL-92 Compliant GROUP BY Aggregations</a></li>
+<li><a href="#Column_aliases">Column Aliases</a></li>
+</ul>
+</li>
+<li><a href="#Where_having_clauses">WHERE Clauses and HAVING Clauses</a></li>
+<li><a href="#Order_By_clauses">ORDER BY Clauses</a></li>
+<li><a href="#Limit_clauses">LIMIT Clauses</a></li>
+<li><a href="#With_clauses">WITH Clauses</a></li>
+<li><a href="#Let_clauses">LET Clauses</a></li>
+<li><a href="#Union_all">UNION ALL</a></li>
+<li><a href="#Vs_SQL-92">SQL++ Vs. SQL-92</a></li>
+</ul>
+</li>
+<li><a href="#Errors">4. Errors</a>
+<ul>
+
+<li><a href="#Syntax_errors">Syntax Errors</a></li>
+<li><a href="#Identifier_resolution_errors">Identifier Resolution Errors</a></li>
+<li><a href="#Type_errors">Type Errors</a></li>
+<li><a href="#Resource_errors">Resource Errors</a></li>
+</ul>
+</li>
+<li><a href="#DDL_and_DML_statements">5. DDL and DML Statements</a>
+<ul>
+
+<li><a href="#Lifecycle_management_statements">Lifecycle Management Statements</a>
+<ul>
+
+<li><a href="#Dataverses">Dataverses</a></li>
+<li><a href="#Types">Types</a></li>
+<li><a href="#Datasets">Datasets</a></li>
+<li><a href="#Indices">Indices</a></li>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Removal">Removal</a></li>
+<li><a href="#Load_statement">Load Statement</a></li>
+</ul>
+</li>
+<li><a href="#Modification_statements">Modification Statements</a>
+<ul>
+
+<li><a href="#Inserts">Inserts</a></li>
+<li><a href="#Upserts">Upserts</a></li>
+<li><a href="#Deletes">Deletes</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#Reserved_keywords">Appendix 1. Reserved Keywords</a></li>
+<li><a href="#Performance_tuning">Appendix 2. Performance Tuning</a>
+<ul>
+
+<li><a href="#Parallelism_parameter">Parallelism Parameter</a></li>
+<li><a href="#Memory_parameters">Memory Parameters</a></li>
+</ul>
+</li>
+<li><a href="#Variable_bindings_and_name_resolution">Appendix 3. Variable Bindings and Name Resolution</a></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.
+ !-->
+
+<h1><a name="Introduction" id="Introduction">1. Introduction</a><font size="3" /></h1>
+<p>This document is intended as a reference guide to the full syntax and semantics of the SQL++ Query Language, a SQL-inspired language for working with semistructured data. SQL++ has much in common with SQL, but some differences do exist due to the different data models that the two languages were designed to serve. SQL was designed in the 1970&#x2019;s for interacting with the flat, schema-ified world of relational databases, while SQL++ is much newer and targets the nested, schema-optional (or even schema-less) world of modern NoSQL systems.</p>
+<p>In the context of Apache AsterixDB, SQL++ is intended for working with the Asterix Data Model (<a href="../datamodel.html">ADM</a>),a data model based on a superset of JSON with an enriched and flexible type system. New AsterixDB users are encouraged to read and work through the (much friendlier) guide &#x201c;<a href="primer-sqlpp.html">AsterixDB 101: An ADM and SQL++ Primer</a>&#x201d; before attempting to make use of this document. In addition, readers are advised to read through the <a href="../datamodel.html">Asterix Data Model (ADM) reference guide</a> first as well, as an understanding of the data model is a prerequisite to understanding SQL++.</p>
+<p>In what follows, we detail the features of the SQL++ language in a grammar-guided manner. We list and briefly explain each of the productions in the SQL++ grammar, offering examples (and results) for clarity.</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.
+ !-->
+
+<h1><a name="Expressions" id="Expressions">2. Expressions</a></h1><!--
+ ! 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.
+ !-->
+
+<p>SQL++ is a highly composable expression language. Each SQL++ expression returns zero or more data model instances. There are three major kinds of expressions in SQL++. At the topmost level, a SQL++ expression can be an OperatorExpression (similar to a mathematical expression), an ConditionalExpression (to choose between alternative values), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we explore the full SQL++ grammar.</p>
+
+<div>
+<div>
+<pre class="source">Expression ::= OperatorExpression | CaseExpression | QuantifiedExpression
+</pre></div></div>
+
+<p>Note that in the following text, words enclosed in angle brackets denote keywords that are not case-sensitive.</p>
+<div class="section">
+<h2><a name="Operator_Expressions"></a><a name="Operator_expressions" id="Operator_expressions">Operator Expressions</a></h2>
+<p>Operators perform a specific operation on the input values or expressions. The syntax of an operator expression is as follows:</p>
+
+<div>
+<div>
+<pre class="source">OperatorExpression ::= PathExpression
+                       | Operator OperatorExpression
+                       | OperatorExpression Operator (OperatorExpression)?
+                       | OperatorExpression &lt;BETWEEN&gt; OperatorExpression &lt;AND&gt; OperatorExpression
+</pre></div></div>
+
+<p>SQL++ provides a full set of operators that you can use within its statements. Here are the categories of operators:</p>
+<ul>
+
+<li><a href="#Arithmetic_operators">Arithmetic Operators</a>, to perform basic mathematical operations;</li>
+<li><a href="#Collection_operators">Collection Operators</a>, to evaluate expressions on collections or objects;</li>
+<li><a href="#Comparison_operators">Comparison Operators</a>, to compare two expressions;</li>
+<li><a href="#Logical_operators">Logical Operators</a>, to combine operators using Boolean logic.</li>
+</ul>
+<p>The following table summarizes the precedence order (from higher to lower) of the major unary and binary operators:</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator                                                                    </th>
+<th> Operation </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> EXISTS, NOT EXISTS                                                          </td>
+<td>  Collection emptiness testing </td></tr>
+<tr class="a">
+<td> ^                                                                           </td>
+<td>  Exponentiation  </td></tr>
+<tr class="b">
+<td> *, /, %                                                                     </td>
+<td>  Multiplication, division, modulo </td></tr>
+<tr class="a">
+<td> +, -                                                                        </td>
+<td>  Addition, subtraction  </td></tr>
+<tr class="b">
+<td> ||                                                                          </td>
+<td>  String concatenation </td></tr>
+<tr class="a">
+<td> IS NULL, IS NOT NULL, IS MISSING, IS NOT MISSING, <br />IS UNKNOWN, IS NOT UNKNOWN, IS VALUED, IS NOT VALUED </td>
+<td> Unknown value comparison </td></tr>
+<tr class="b">
+<td> BETWEEN, NOT BETWEEN                                                        </td>
+<td> Range comparison (inclusive on both sides) </td></tr>
+<tr class="a">
+<td> =, !=, &lt;&gt;, &lt;, &gt;, &lt;=, &gt;=, LIKE, NOT LIKE, IN, NOT IN                             </td>
+<td> Comparison  </td></tr>
+<tr class="b">
+<td> NOT                                                                         </td>
+<td> Logical negation </td></tr>
+<tr class="a">
+<td> AND                                                                         </td>
+<td> Conjunction </td></tr>
+<tr class="b">
+<td> OR                                                                          </td>
+<td> Disjunction </td></tr>
+</tbody>
+</table>
+<p>In general, if any operand evaluates to a <tt>MISSING</tt> value, the enclosing operator will return <tt>MISSING</tt>; if none of operands evaluates to a <tt>MISSING</tt> value but there is an operand evaluates to a <tt>NULL</tt> value, the enclosing operator will return <tt>NULL</tt>. However, there are a few exceptions listed in <a href="#Comparison_operators">comparison operators</a> and <a href="#Logical_operators">logical operators</a>.</p>
+<div class="section">
+<h3><a name="Arithmetic_Operators"></a><a name="Arithmetic_operators" id="Arithmetic_operators">Arithmetic Operators</a></h3>
+<p>Arithmetic operators are used to exponentiate, add, subtract, multiply, and divide numeric values, or concatenate string values.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator     </th>
+<th>  Purpose                                                                </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> +, -         </td>
+<td>  As unary operators, they denote a <br />positive or negative expression </td>
+<td> SELECT VALUE -1; </td></tr>
+<tr class="a">
+<td> +, -         </td>
+<td>  As binary operators, they add or subtract                              </td>
+<td> SELECT VALUE 1 + 2; </td></tr>
+<tr class="b">
+<td> *, /, %      </td>
+<td>  Multiply, divide, modulo                                               </td>
+<td> SELECT VALUE 4 / 2.0; </td></tr>
+<tr class="a">
+<td> ^            </td>
+<td>  Exponentiation                                                         </td>
+<td> SELECT VALUE 2^3;       </td></tr>
+<tr class="b">
+<td> || </td>
+<td>  String concatenation                                                   </td>
+<td> SELECT VALUE &#x201c;ab&#x201d;||&#x201c;c&#x201d;||&#x201c;d&#x201d;;       </td></tr>
+</tbody>
+</table></div>
+<div class="section">
+<h3><a name="Collection_Operators"></a><a name="Collection_operators" id="Collection_operators">Collection Operators</a></h3>
+<p>Collection operators are used for membership tests (IN, NOT IN) or empty collection tests (EXISTS, NOT EXISTS).</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator   </th>
+<th>  Purpose                                     </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> IN         </td>
+<td>  Membership test                             </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.lang IN [&#x201c;en&#x201d;, &#x201c;de&#x201d;]; </td></tr>
+<tr class="a">
+<td> NOT IN     </td>
+<td>  Non-membership test                         </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.lang NOT IN [&#x201c;en&#x201d;]; </td></tr>
+<tr class="b">
+<td> EXISTS     </td>
+<td>  Check whether a collection is not empty     </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE EXISTS cm.referredTopics; </td></tr>
+<tr class="a">
+<td> NOT EXISTS </td>
+<td>  Check whether a collection is empty         </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE NOT EXISTS cm.referredTopics; </td></tr>
+</tbody>
+</table></div>
+<div class="section">
+<h3><a name="Comparison_Operators"></a><a name="Comparison_operators" id="Comparison_operators">Comparison Operators</a></h3>
+<p>Comparison operators are used to compare values. The comparison operators fall into one of two sub-categories: missing value comparisons and regular value comparisons. SQL++ (and JSON) has two ways of representing missing information in a object - the presence of the field with a NULL for its value (as in SQL), and the absence of the field (which JSON permits). For example, the first of the following objects represents Jack, whose friend is Jill. In the other examples, Jake is friendless a la SQL, with a friend field that is NULL, while Joe is friendless in a more natural (for JSON) way, i.e., by not having a friend field.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+<p>{&#x201c;name&#x201d;: &#x201c;Jack&#x201d;, &#x201c;friend&#x201d;: &#x201c;Jill&#x201d;}</p>
+<p>{&#x201c;name&#x201d;: &#x201c;Jake&#x201d;, &#x201c;friend&#x201d;: NULL}</p>
+<p>{&#x201c;name&#x201d;: &#x201c;Joe&#x201d;}</p>
+<p>The following table enumerates all of SQL++&#x2019;s comparison operators.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator       </th>
+<th>  Purpose                                   </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> IS NULL        </td>
+<td>  Test if a value is NULL                       </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NULL; </td></tr>
+<tr class="a">
+<td> IS NOT NULL    </td>
+<td>  Test if a value is not NULL                   </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT NULL; </td></tr>
+<tr class="b">
+<td> IS MISSING     </td>
+<td>  Test if a value is MISSING                    </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS MISSING; </td></tr>
+<tr class="a">
+<td> IS NOT MISSING </td>
+<td>  Test if a value is not MISSING                </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT MISSING;</td></tr>
+<tr class="b">
+<td> IS UNKNOWN     </td>
+<td>  Test if a value is NULL or MISSING            </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS UNKNOWN; </td></tr>
+<tr class="a">
+<td> IS NOT UNKNOWN </td>
+<td>  Test if a value is neither NULL nor MISSING   </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT UNKNOWN;</td></tr>
+<tr class="b">
+<td> IS VALUED      </td>
+<td>  Test if a value is neither NULL nor MISSING   </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS VALUED; </td></tr>
+<tr class="a">
+<td> IS NOT VALUED  </td>
+<td>  Test if a value is NULL or MISSING            </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT VALUED;</td></tr>
+<tr class="b">
+<td> BETWEEN        </td>
+<td>  Test if a value is between a start value and <br />a end value. The comparison is inclusive <br />to both start and end values. </td>
+<td>  SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId BETWEEN 10 AND 20;</td></tr>
+<tr class="a">
+<td> =              </td>
+<td>  Equality test                                 </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId=10; </td></tr>
+<tr class="b">
+<td> !=             </td>
+<td>  Inequality test                               </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId!=10;</td></tr>
+<tr class="a">
+<td> &lt;&gt;             </td>
+<td>  Inequality test                               </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;&gt;10;</td></tr>
+<tr class="b">
+<td> &lt;              </td>
+<td>  Less than                                     </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;10; </td></tr>
+<tr class="a">
+<td> &gt;              </td>
+<td>  Greater than                                  </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&gt;10; </td></tr>
+<tr class="b">
+<td> &lt;=             </td>
+<td>  Less than or equal to                         </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;=10; </td></tr>
+<tr class="a">
+<td> &gt;=             </td>
+<td>  Greater than or equal to                      </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&gt;=10; </td></tr>
+<tr class="b">
+<td> LIKE           </td>
+<td>  Test if the left side matches a<br /> pattern defined on the right<br /> side; in the pattern,  &#x201c;%&#x201d; matches  <br />any string while &#x201c;_&#x201d; matches <br /> any character. </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name LIKE &#x201c;%Giesen%&#x201d;;</td></tr>
+<tr class="a">
+<td> NOT LIKE       </td>
+<td>  Test if the left side does not <br />match a pattern defined on the right<br /> side; in the pattern,  &#x201c;%&#x201d; matches <br />any string while &#x201c;_&#x201d; matches <br /> any character. </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name NOT LIKE &#x201c;%Giesen%&#x201d;;</td></tr>
+</tbody>
+</table>
+<p>The following table summarizes how the missing value comparison operators work.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator </th>
+<th> Non-NULL/Non-MISSING value </th>
+<th> NULL </th>
+<th> MISSING </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> IS NULL  </td>
+<td> FALSE </td>
+<td> TRUE </td>
+<td> MISSING </td></tr>
+<tr class="a">
+<td> IS NOT NULL </td>
+<td> TRUE </td>
+<td> FALSE </td>
+<td> MISSING </td></tr>
+<tr class="b">
+<td> IS MISSING  </td>
+<td> FALSE </td>
+<td> FALSE </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> IS NOT MISSING </td>
+<td> TRUE </td>
+<td> TRUE </td>
+<td> FALSE </td></tr>
+<tr class="b">
+<td> IS UNKNOWN </td>
+<td> FALSE </td>
+<td> TRUE </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> IS NOT UNKNOWN </td>
+<td> TRUE </td>
+<td> FALSE </td>
+<td> FALSE</td></tr>
+<tr class="b">
+<td> IS VALUED </td>
+<td> TRUE </td>
+<td> FALSE </td>
+<td> FALSE </td></tr>
+<tr class="a">
+<td> IS NOT VALUED </td>
+<td> FALSE </td>
+<td> TRUE </td>
+<td> TRUE </td></tr>
+</tbody>
+</table></div></div></div>
+<div class="section">
+<h3><a name="Logical_Operators"></a><a name="Logical_operators" id="Logical_operators">Logical Operators</a></h3>
+<p>Logical operators perform logical <tt>NOT</tt>, <tt>AND</tt>, and <tt>OR</tt> operations over Boolean values (<tt>TRUE</tt> and <tt>FALSE</tt>) plus <tt>NULL</tt> and <tt>MISSING</tt>.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator </th>
+<th>  Purpose                                   </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> NOT      </td>
+<td>  Returns true if the following condition is false, otherwise returns false  </td>
+<td> SELECT VALUE NOT TRUE;  </td></tr>
+<tr class="a">
+<td> AND      </td>
+<td>  Returns true if both branches are true, otherwise returns false            </td>
+<td> SELECT VALUE TRUE AND FALSE; </td></tr>
+<tr class="b">
+<td> OR       </td>
+<td>  Returns true if one branch is true, otherwise returns false                </td>
+<td> SELECT VALUE FALSE OR FALSE; </td></tr>
+</tbody>
+</table>
+<p>The following table is the truth table for <tt>AND</tt> and <tt>OR</tt>.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> A  </th>
+<th> B  </th>
+<th> A AND B  </th>
+<th> A OR B </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> TRUE </td>
+<td> TRUE </td>
+<td> TRUE </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> TRUE </td>
+<td> FALSE </td>
+<td> FALSE </td>
+<td> TRUE </td></tr>
+<tr class="b">
+<td> TRUE </td>
+<td> NULL </td>
+<td> NULL </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> TRUE </td>
+<td> MISSING </td>
+<td> MISSING </td>
+<td> TRUE </td></tr>
+<tr class="b">
+<td> FALSE </td>
+<td> FALSE </td>
+<td> FALSE </td>
+<td> FALSE </td></tr>
+<tr class="a">
+<td> FALSE </td>
+<td> NULL </td>
+<td> FALSE </td>
+<td> NULL </td></tr>
+<tr class="b">
+<td> FALSE </td>
+<td> MISSING </td>
+<td> FALSE </td>
+<td> MISSING </td></tr>
+<tr class="a">
+<td> NULL </td>
+<td> NULL </td>
+<td> NULL </td>
+<td> NULL </td></tr>
+<tr class="b">
+<td> NULL </td>
+<td> MISSING </td>
+<td> MISSING </td>
+<td> NULL </td></tr>
+<tr class="a">
+<td> MISSING </td>
+<td> MISSING </td>
+<td> MISSING </td>
+<td> MISSING </td></tr>
+</tbody>
+</table>
+<p>The following table demonstrates the results of <tt>NOT</tt> on all possible inputs.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> A  </th>
+<th> NOT A </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> TRUE </td>
+<td> FALSE </td></tr>
+<tr class="a">
+<td> FALSE </td>
+<td> TRUE </td></tr>
+<tr class="b">
+<td> NULL </td>
+<td> NULL </td></tr>
+<tr class="a">
+<td> MISSING </td>
+<td> MISSING </td></tr>
+</tbody>
+</table></div></div>
+<div class="section">
+<h2><a name="Case_Expressions"></a><a name="Case_expressions" id="Case_expressions">Case Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">CaseExpression ::= SimpleCaseExpression | SearchedCaseExpression
+SimpleCaseExpression ::= &lt;CASE&gt; Expression ( &lt;WHEN&gt; Expression &lt;THEN&gt; Expression )+ ( &lt;ELSE&gt; Expression )? &lt;END&gt;
+SearchedCaseExpression ::= &lt;CASE&gt; ( &lt;WHEN&gt; Expression &lt;THEN&gt; Expression )+ ( &lt;ELSE&gt; Expression )? &lt;END&gt;
+</pre></div></div>
+
+<p>In a simple <tt>CASE</tt> expression, the query evaluator searches for the first <tt>WHEN</tt> &#x2026; <tt>THEN</tt> pair in which the <tt>WHEN</tt> expression is equal to the expression following <tt>CASE</tt> and returns the expression following <tt>THEN</tt>. If none of the <tt>WHEN</tt> &#x2026; <tt>THEN</tt> pairs meet this condition, and an <tt>ELSE</tt> branch exists, it returns the <tt>ELSE</tt> expression. Otherwise, <tt>NULL</tt> is returned.</p>
+<p>In a searched CASE expression, the query evaluator searches from left to right until it finds a <tt>WHEN</tt> expression that is evaluated to <tt>TRUE</tt>, and then returns its corresponding <tt>THEN</tt> expression. If no condition is found to be <tt>TRUE</tt>, and an <tt>ELSE</tt> branch exists, it returns the <tt>ELSE</tt> expression. Otherwise, it returns <tt>NULL</tt>.</p>
+<p>The following example illustrates the form of a case expression.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">CASE (2 &lt; 3) WHEN true THEN &quot;yes&quot; ELSE &quot;no&quot; END
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="Quantified_Expressions"></a><a name="Quantified_expressions" id="Quantified_expressions">Quantified Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">QuantifiedExpression ::= ( (&lt;ANY&gt;|&lt;SOME&gt;) | &lt;EVERY&gt; ) Variable &lt;IN&gt; Expression ( &quot;,&quot; Variable &quot;in&quot; Expression )*
+                         &lt;SATISFIES&gt; Expression (&lt;END&gt;)?
+</pre></div></div>
+
+<p>Quantified expressions are used for expressing existential or universal predicates involving the elements of a collection.</p>
+<p>The following pair of examples illustrate the use of a quantified expression to test that every (or some) element in the set [1, 2, 3] of integers is less than three. The first example yields <tt>FALSE</tt> and second example yields <tt>TRUE</tt>.</p>
+<p>It is useful to note that if the set were instead the empty set, the first expression would yield <tt>TRUE</tt> (&#x201c;every&#x201d; value in an empty set satisfies the condition) while the second expression would yield <tt>FALSE</tt> (since there isn&#x2019;t &#x201c;some&#x201d; value, as there are no values in the set, that satisfies the condition).</p>
+<p>A quantified expression will return a <tt>NULL</tt> (or <tt>MISSING</tt>) if the first expression in it evaluates to <tt>NULL</tt> (or <tt>MISSING</tt>). A type error will be raised if the first expression in a quantified expression does not return a collection.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">EVERY x IN [ 1, 2, 3 ] SATISFIES x &lt; 3
+SOME x IN [ 1, 2, 3 ] SATISFIES x &lt; 3
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="Path_Expressions"></a><a name="Path_expressions" id="Path_expressions">Path Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">PathExpression  ::= PrimaryExpression ( Field | Index )*
+Field           ::= &quot;.&quot; Identifier
+Index           ::= &quot;[&quot; ( Expression | &quot;?&quot; ) &quot;]&quot;
+</pre></div></div>
+
+<p>Components of complex types in the data model are accessed via path expressions. Path access can be applied to the result of a SQL++ expression that yields an instance of  a complex type, for example, a object or array instance. For objects, path access is based on field names. For arrays, path access is based on (zero-based) array-style indexing. SQL++ also supports an &#x201c;I&#x2019;m feeling lucky&#x201d; style index accessor, [?], for selecting an arbitrary element from an array. Attempts to access non-existent fields or out-of-bound array elements produce the special value <tt>MISSING</tt>. Type errors will be raised for inappropriate use of a path expression, such as applying a field accessor to a numeric value.</p>
+<p>The following examples illustrate field access for a object, index-based element access for an array, and also a composition thereof.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">({&quot;name&quot;: &quot;MyABCs&quot;, &quot;array&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).array
+
+([&quot;a&quot;, &quot;b&quot;, &quot;c&quot;])[2]
+
+({&quot;name&quot;: &quot;MyABCs&quot;, &quot;array&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).array[2]
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="Primary_Expressions"></a><a name="Primary_expressions" id="Primary_expressions">Primary Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">PrimaryExpr ::= Literal
+              | VariableReference
+              | ParenthesizedExpression
+              | FunctionCallExpression
+              | Constructor
+</pre></div></div>
+
+<p>The most basic building block for any SQL++ expression is PrimaryExpression. This can be a simple literal (constant) value, a reference to a query variable that is in scope, a parenthesized expression, a function call, or a newly constructed instance of the data model (such as a newly constructed object, array, or multiset of data model instances).</p></div>
+<div class="section">
+<h2><a name="Literals" id="Literals">Literals</a></h2>
+
+<div>
+<div>
+<pre class="source">Literal        ::= StringLiteral
+                   | IntegerLiteral
+                   | FloatLiteral
+                   | DoubleLiteral
+                   | &lt;NULL&gt;
+                   | &lt;MISSING&gt;
+                   | &lt;TRUE&gt;
+                   | &lt;FALSE&gt;
+StringLiteral  ::= &quot;\&quot;&quot; (
+                             &lt;EscapeQuot&gt;
+                           | &lt;EscapeBslash&gt;
+                           | &lt;EscapeSlash&gt;
+                           | &lt;EscapeBspace&gt;
+                           | &lt;EscapeFormf&gt;
+                           | &lt;EscapeNl&gt;
+                           | &lt;EscapeCr&gt;
+                           | &lt;EscapeTab&gt;
+                           | ~[&quot;\&quot;&quot;,&quot;\\&quot;])*
+                    &quot;\&quot;&quot;
+                    | &quot;\'&quot;(
+                             &lt;EscapeApos&gt;
+                           | &lt;EscapeBslash&gt;
+                           | &lt;EscapeSlash&gt;
+                           | &lt;EscapeBspace&gt;
+                           | &lt;EscapeFormf&gt;
+                           | &lt;EscapeNl&gt;
+                           | &lt;EscapeCr&gt;
+                           | &lt;EscapeTab&gt;
+                           | ~[&quot;\'&quot;,&quot;\\&quot;])*
+                      &quot;\'&quot;
+&lt;ESCAPE_Apos&gt;  ::= &quot;\\\'&quot;
+&lt;ESCAPE_Quot&gt;  ::= &quot;\\\&quot;&quot;
+&lt;EscapeBslash&gt; ::= &quot;\\\\&quot;
+&lt;EscapeSlash&gt;  ::= &quot;\\/&quot;
+&lt;EscapeBspace&gt; ::= &quot;\\b&quot;
+&lt;EscapeFormf&gt;  ::= &quot;\\f&quot;
+&lt;EscapeNl&gt;     ::= &quot;\\n&quot;
+&lt;EscapeCr&gt;     ::= &quot;\\r&quot;
+&lt;EscapeTab&gt;    ::= &quot;\\t&quot;
+
+IntegerLiteral ::= &lt;DIGITS&gt;
+&lt;DIGITS&gt;       ::= [&quot;0&quot; - &quot;9&quot;]+
+FloatLiteral   ::= &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+                 | &lt;DIGITS&gt; ( &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; ) )?
+                 | &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+DoubleLiteral  ::= &lt;DIGITS&gt; &quot;.&quot; &lt;DIGITS&gt;
+                   | &quot;.&quot; &lt;DIGITS&gt;
+</pre></div></div>
+
+<p>Literals (constants) in SQL++ can be strings, integers, floating point values, double values, boolean constants, or special constant values like <tt>NULL</tt> and <tt>MISSING</tt>. The <tt>NULL</tt> value is like a <tt>NULL</tt> in SQL; it is used to represent an unknown field value. The specialy value <tt>MISSING</tt> is only meaningful in the context of SQL++ field accesses; it occurs when the accessed field simply does not exist at all in a object being accessed.</p>
+<p>The following are some simple examples of SQL++ literals.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">'a string'
+&quot;test string&quot;
+42
+</pre></div></div>
+
+<p>Different from standard SQL, double quotes play the same role as single quotes and may be used for string literals in SQL++.</p></div></div></div>
+<div class="section">
+<h3><a name="Variable_References"></a><a name="Variable_references" id="Variable_references">Variable References</a></h3>
+
+<div>
+<div>
+<pre class="source">VariableReference     ::= &lt;IDENTIFIER&gt;|&lt;DelimitedIdentifier&gt;
+&lt;IDENTIFIER&gt;          ::= (&lt;LETTER&gt; | &quot;_&quot;) (&lt;LETTER&gt; | &lt;DIGIT&gt; | &quot;_&quot; | &quot;$&quot;)*
+&lt;LETTER&gt;              ::= [&quot;A&quot; - &quot;Z&quot;, &quot;a&quot; - &quot;z&quot;]
+DelimitedIdentifier   ::= &quot;`&quot; (&lt;EscapeQuot&gt;
+                                | &lt;EscapeBslash&gt;
+                                | &lt;EscapeSlash&gt;
+                                | &lt;EscapeBspace&gt;
+                                | &lt;EscapeFormf&gt;
+                                | &lt;EscapeNl&gt;
+                                | &lt;EscapeCr&gt;
+                                | &lt;EscapeTab&gt;
+                                | ~[&quot;`&quot;,&quot;\\&quot;])*
+                          &quot;`&quot;
+</pre></div></div>
+
+<p>A variable in SQL++ can be bound to any legal data model value. A variable reference refers to the value to which an in-scope variable is bound. (E.g., a variable binding may originate from one of the <tt>FROM</tt>, <tt>WITH</tt> or <tt>LET</tt> clauses of a <tt>SELECT</tt> statement or from an input parameter in the context of a function body.) Backticks, for example, `id`, are used for delimited identifiers. Delimiting is needed when a variable&#x2019;s desired name clashes with a SQL++ keyword or includes characters not allowed in regular identifiers. More information on exactly how variable references are resolved can be found in the appendix section on Variable Resolution.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">tweet
+id
+`SELECT`
+`my-function`
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Parenthesized_Expressions"></a><a name="Parenthesized_expressions" id="Parenthesized_expressions">Parenthesized Expressions</a></h3>
+
+<div>
+<div>
+<pre class="source">ParenthesizedExpression ::= &quot;(&quot; Expression &quot;)&quot; | Subquery
+</pre></div></div>
+
+<p>An expression can be parenthesized to control the precedence order or otherwise clarify a query. In SQL++, for composability, a subquery is also an parenthesized expression.</p>
+<p>The following expression evaluates to the value 2.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">( 1 + 1 )
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Function_Call_Expressions"></a><a name="Function_call_expressions" id="Function_call_expressions">Function Call Expressions</a></h3>
+
+<div>
+<div>
+<pre class="source">FunctionCallExpression ::= FunctionName &quot;(&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;)&quot;
+</pre></div></div>
+
+<p>Functions are included in SQL++, like most languages, as a way to package useful functionality or to componentize complicated or reusable SQL++ computations. A function call is a legal SQL++ query expression that represents the value resulting from the evaluation of its body expression with the given parameter bindings; the parameter value bindings can themselves be any SQL++ expressions.</p>
+<p>The following example is a (built-in) function call expression whose value is 8.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">length('a string')
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Constructors" id="Constructors">Constructors</a></h3>
+
+<div>
+<div>
+<pre class="source">Constructor              ::= ArrayConstructor | MultisetConstructor | ObjectConstructor
+ArrayConstructor         ::= &quot;[&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;]&quot;
+MultisetConstructor      ::= &quot;{{&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;}}&quot;
+ObjectConstructor        ::= &quot;{&quot; ( FieldBinding ( &quot;,&quot; FieldBinding )* )? &quot;}&quot;
+FieldBinding             ::= Expression &quot;:&quot; Expression
+</pre></div></div>
+
+<p>A major feature of SQL++ is its ability to construct new data model instances. This is accomplished using its constructors for each of the model&#x2019;s complex object structures, namely arrays, multisets, and objects. Arrays are like JSON arrays, while multisets have bag semantics. Objects are built from fields that are field-name/field-value pairs, again like JSON.</p>
+<p>The following examples illustrate how to construct a new array with 4 items and a new object with 2 fields respectively. Array elements can be homogeneous (as in the first example), which is the common case, or they may be heterogeneous (as in the second example). The data values and field name values used to construct arrays, multisets, and objects in constructors are all simply SQL++ expressions. Thus, the collection elements, field names, and field values used in constructors can be simple literals or they can come from query variable references or even arbitrarily complex SQL++ expressions (subqueries). Type errors will be raised if the field names in an object are not strings, and duplicate field errors will be raised if they are not distinct.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">[ 'a', 'b', 'c', 'c' ]
+
+[ 42, &quot;forty-two!&quot;, { &quot;rank&quot; : &quot;Captain&quot;, &quot;name&quot;: &quot;America&quot; }, 3.14159 ]
+
+{
+  'project name': 'Hyracks',
+  'project members': [ 'vinayakb', 'dtabass', 'chenli', 'tsotras', 'tillw' ]
+}
+</pre></div></div>
+<!--
+ ! 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><a name="Queries" id="Queries">3. Queries</a></h1>
+<p>A SQL++ query can be any legal SQL++ expression or <tt>SELECT</tt> statement. A SQL++ query always ends with a semicolon.</p>
+
+<div>
+<div>
+<pre class="source">Query ::= (Expression | SelectStatement) &quot;;&quot;
+</pre></div></div>
+<!--
+ ! 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></div>
+<div class="section">
+<h2><a name="Declarations" id="Declarations">Declarations</a></h2>
+
+<div>
+<div>
+<pre class="source">DatabaseDeclaration ::= &quot;USE&quot; Identifier
+</pre></div></div>
+
+<p>At the uppermost level, the world of data is organized into data namespaces called <b>dataverses</b>. To set the default dataverse for a series of statements, the USE statement is provided in SQL++.</p>
+<p>As an example, the following statement sets the default dataverse to be &#x201c;TinySocial&#x201d;.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">USE TinySocial;
+</pre></div></div>
+<!--
+ ! 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.
+ !-->
+
+<p>When writing a complex SQL++ query, it can sometimes be helpful to define one or more auxilliary functions that each address a sub-piece of the overall query. The declare function statement supports the creation of such helper functions. In general, the function body (expression) can be any legal SQL++ query expression.</p>
+
+<div>
+<div>
+<pre class="source">FunctionDeclaration  ::= &quot;DECLARE&quot; &quot;FUNCTION&quot; Identifier ParameterList &quot;{&quot; Expression &quot;}&quot;
+ParameterList        ::= &quot;(&quot; ( &lt;VARIABLE&gt; ( &quot;,&quot; &lt;VARIABLE&gt; )* )? &quot;)&quot;
+</pre></div></div>
+
+<p>The following is a simple example of a temporary SQL++ function definition and its use.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">DECLARE FUNCTION friendInfo(userId) {
+    (SELECT u.id, u.name, len(u.friendIds) AS friendCount
+     FROM GleambookUsers u
+     WHERE u.id = userId)[0]
+ };
+
+SELECT VALUE friendInfo(2);
+</pre></div></div>
+
+<p>For our sample data set, this returns:</p>
+
+<div>
+<div>
+<pre class="source">[
+  { &quot;id&quot;: 2, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;friendCount&quot;: 2 }
+]
+</pre></div></div>
+<!--
+ ! 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></div>
+<div class="section">
+<h2><a name="SELECT_Statements"></a><a name="SELECT_statements" id="SELECT_statements">SELECT Statements</a></h2>
+<p>The following shows the (rich) grammar for the <tt>SELECT</tt> statement in SQL++.</p>
+
+<div>
+<div>
+<pre class="source">SelectStatement    ::= ( WithClause )?
+                       SelectSetOperation (OrderbyClause )? ( LimitClause )?
+SelectSetOperation ::= SelectBlock (&lt;UNION&gt; &lt;ALL&gt; ( SelectBlock | Subquery ) )*
+Subquery           ::= &quot;(&quot; SelectStatement &quot;)&quot;
+
+SelectBlock        ::= SelectClause
+                       ( FromClause ( LetClause )?)?
+                       ( WhereClause )?
+                       ( GroupbyClause ( LetClause )? ( HavingClause )? )?
+                       |
+                       FromClause ( LetClause )?
+                       ( WhereClause )?
+                       ( GroupbyClause ( LetClause )? ( HavingClause )? )?
+                       SelectClause
+
+SelectClause       ::= &lt;SELECT&gt; ( &lt;ALL&gt; | &lt;DISTINCT&gt; )? ( SelectRegular | SelectValue )
+SelectRegular      ::= Projection ( &quot;,&quot; Projection )*
+SelectValue        ::= ( &lt;VALUE&gt; | &lt;ELEMENT&gt; | &lt;RAW&gt; ) Expression
+Projection         ::= ( Expression ( &lt;AS&gt; )? Identifier | &quot;*&quot; )
+
+FromClause         ::= &lt;FROM&gt; FromTerm ( &quot;,&quot; FromTerm )*
+FromTerm           ::= Expression (( &lt;AS&gt; )? Variable)?
+                       ( ( JoinType )? ( JoinClause | UnnestClause ) )*
+
+JoinClause         ::= &lt;JOIN&gt; Expression (( &lt;AS&gt; )? Variable)? &lt;ON&gt; Expression
+UnnestClause       ::= ( &lt;UNNEST&gt; ) Expression
+                       ( &lt;AS&gt; )? Variable ( &lt;AT&gt; Variable )?
+JoinType           ::= ( &lt;INNER&gt; | &lt;LEFT&gt; ( &lt;OUTER&gt; )? )
+
+WithClause         ::= &lt;WITH&gt; WithElement ( &quot;,&quot; WithElement )*
+LetClause          ::= (&lt;LET&gt; | &lt;LETTING&gt;) LetElement ( &quot;,&quot; LetElement )*
+LetElement         ::= Variable &quot;=&quot; Expression
+WithElement        ::= Variable &lt;AS&gt; Expression
+
+WhereClause        ::= &lt;WHERE&gt; Expression
+
+GroupbyClause      ::= &lt;GROUP&gt; &lt;BY&gt; Expression ( ( (&lt;AS&gt;)? Variable )?
+                       ( &quot;,&quot; Expression ( (&lt;AS&gt;)? Variable )? )* )
+                       ( &lt;GROUP&gt; &lt;AS&gt; Variable
+                         (&quot;(&quot; VariableReference &lt;AS&gt; Identifier
+                         (&quot;,&quot; VariableReference &lt;AS&gt; Identifier )* &quot;)&quot;)?
+                       )?
+HavingClause       ::= &lt;HAVING&gt; Expression
+
+OrderbyClause      ::= &lt;ORDER&gt; &lt;BY&gt; Expression ( &lt;ASC&gt; | &lt;DESC&gt; )?
+                       ( &quot;,&quot; Expression ( &lt;ASC&gt; | &lt;DESC&gt; )? )*
+LimitClause        ::= &lt;LIMIT&gt; Expression ( &lt;OFFSET&gt; Expression )?
+</pre></div></div>
+
+<p>In this section, we will make use of two stored collections of objects (datasets), <tt>GleambookUsers</tt> and <tt>GleambookMessages</tt>, in a series of running examples to explain <tt>SELECT</tt> queries. The contents of the example collections are as follows:</p>
+<p><tt>GleambookUsers</tt> collection (or, dataset):</p>
+
+<div>
+<div>
+<pre class="source">[ {
+  &quot;id&quot;:1,
+  &quot;alias&quot;:&quot;Margarita&quot;,
+  &quot;name&quot;:&quot;MargaritaStoddard&quot;,
+  &quot;nickname&quot;:&quot;Mags&quot;,
+  &quot;userSince&quot;:&quot;2012-08-20T10:10:00&quot;,
+  &quot;friendIds&quot;:[2,3,6,10],
+  &quot;employment&quot;:[{
+                  &quot;organizationName&quot;:&quot;Codetechno&quot;,
+                  &quot;start-date&quot;:&quot;2006-08-06&quot;
+                },
+                {
+                  &quot;organizationName&quot;:&quot;geomedia&quot;,
+                  &quot;start-date&quot;:&quot;2010-06-17&quot;,
+                  &quot;end-date&quot;:&quot;2010-01-26&quot;
+                }],
+  &quot;gender&quot;:&quot;F&quot;
+},
+{
+  &quot;id&quot;:2,
+  &quot;alias&quot;:&quot;Isbel&quot;,
+  &quot;name&quot;:&quot;IsbelDull&quot;,
+  &quot;nickname&quot;:&quot;Izzy&quot;,
+  &quot;userSince&quot;:&quot;2011-01-22T10:10:00&quot;,
+  &quot;friendIds&quot;:[1,4],
+  &quot;employment&quot;:[{
+                  &quot;organizationName&quot;:&quot;Hexviafind&quot;,
+                  &quot;startDate&quot;:&quot;2010-04-27&quot;
+               }]
+},
+{
+  &quot;id&quot;:3,
+  &quot;alias&quot;:&quot;Emory&quot;,
+  &quot;name&quot;:&quot;EmoryUnk&quot;,
+  &quot;userSince&quot;:&quot;2012-07-10T10:10:00&quot;,
+  &quot;friendIds&quot;:[1,5,8,9],
+  &quot;employment&quot;:[{
+                  &quot;organizationName&quot;:&quot;geomedia&quot;,
+                  &quot;startDate&quot;:&quot;2010-06-17&quot;,
+                  &quot;endDate&quot;:&quot;2010-01-26&quot;
+               }]
+} ]
+</pre></div></div>
+
+<p><tt>GleambookMessages</tt> collection (or, dataset):</p>
+
+<div>
+<div>
+<pre class="source">[ {
+  &quot;messageId&quot;:2,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:4,
+  &quot;senderLocation&quot;:[41.66,80.87],
+  &quot;message&quot;:&quot; dislike x-phone its touch-screen is horrible&quot;
+},
+{
+  &quot;messageId&quot;:3,
+  &quot;authorId&quot;:2,
+  &quot;inResponseTo&quot;:4,
+  &quot;senderLocation&quot;:[48.09,81.01],
+  &quot;message&quot;:&quot; like product-y the plan is amazing&quot;
+},
+{
+  &quot;messageId&quot;:4,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:2,
+  &quot;senderLocation&quot;:[37.73,97.04],
+  &quot;message&quot;:&quot; can't stand acast the network is horrible:(&quot;
+},
+{
+  &quot;messageId&quot;:6,
+  &quot;authorId&quot;:2,
+  &quot;inResponseTo&quot;:1,
+  &quot;senderLocation&quot;:[31.5,75.56],
+  &quot;message&quot;:&quot; like product-z its platform is mind-blowing&quot;
+}
+{
+  &quot;messageId&quot;:8,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:11,
+  &quot;senderLocation&quot;:[40.33,80.87],
+  &quot;message&quot;:&quot; like ccast the 3G is awesome:)&quot;
+},
+{
+  &quot;messageId&quot;:10,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:12,
+  &quot;senderLocation&quot;:[42.5,70.01],
+  &quot;message&quot;:&quot; can't stand product-w the touch-screen is terrible&quot;
+},
+{
+  &quot;messageId&quot;:11,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:1,
+  &quot;senderLocation&quot;:[38.97,77.49],
+  &quot;message&quot;:&quot; can't stand acast its plan is terrible&quot;
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="SELECT_Clause"></a><a name="Select_clauses" id="Select_clauses">SELECT Clause</a></h2>
+<p>The SQL++ <tt>SELECT</tt> clause always returns a collection value as its result (even if the result is empty or a singleton).</p>
+<div class="section">
+<h3><a name="Select_Element.2FValue.2FRaw"></a><a name="Select_element" id="Select_element">Select Element/Value/Raw</a></h3>
+<p>The <tt>SELECT VALUE</tt> clause in SQL++ returns an array or multiset that contains the results of evaluating the <tt>VALUE</tt> expression, with one evaluation being performed per &#x201c;binding tuple&#x201d; (i.e., per <tt>FROM</tt> clause item) satisfying the statement&#x2019;s selection criteria. For historical reasons SQL++ also allows the keywords <tt>ELEMENT</tt> or <tt>RAW</tt> to be used in place of <tt>VALUE</tt> (not recommended).</p>
+<p>If there is no FROM clause, the expression after <tt>VALUE</tt> is evaluated once with no binding tuples (except those inherited from an outer environment).</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT VALUE 1;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[
+  1
+]
+</pre></div></div>
+
+<p>The following example shows a query that selects one user from the GleambookUsers collection.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT VALUE user
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[{
+    &quot;userSince&quot;: &quot;2012-08-20T10:10:00.000Z&quot;,
+    &quot;friendIds&quot;: [
+        2,
+        3,
+        6,
+        10
+    ],
+    &quot;gender&quot;: &quot;F&quot;,
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;nickname&quot;: &quot;Mags&quot;,
+    &quot;alias&quot;: &quot;Margarita&quot;,
+    &quot;id&quot;: 1,
+    &quot;employment&quot;: [
+        {
+            &quot;organizationName&quot;: &quot;Codetechno&quot;,
+            &quot;start-date&quot;: &quot;2006-08-06&quot;
+        },
+        {
+            &quot;end-date&quot;: &quot;2010-01-26&quot;,
+            &quot;organizationName&quot;: &quot;geomedia&quot;,
+            &quot;start-date&quot;: &quot;2010-06-17&quot;
+        }
+    ]
+} ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="SQL-style_SELECT"></a><a name="SQL_select" id="SQL_select">SQL-style SELECT</a></h3>
+<p>In SQL++, the traditional SQL-style <tt>SELECT</tt> syntax is also supported. This syntax can also be reformulated in a <tt>SELECT VALUE</tt> based manner in SQL++. (E.g., <tt>SELECT expA AS fldA, expB AS fldB</tt> is syntactic sugar for <tt>SELECT VALUE { 'fldA': expA, 'fldB': expB }</tt>.) Unlike in SQL, the result of an SQL++ query does not preserve the order of expressions in the <tt>SELECT</tt> clause.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT user.alias user_alias, user.name user_name
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;user_name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;user_alias&quot;: &quot;Margarita&quot;
+} ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="SELECT_.2A"></a><a name="Select_star" id="Select_star">SELECT *</a></h3>
+<p>In SQL++, <tt>SELECT *</tt> returns a object with a nested field for each input tuple. Each field has as its field name the name of a binding variable generated by either the <tt>FROM</tt> clause or <tt>GROUP BY</tt> clause in the current enclosing <tt>SELECT</tt> statement, and its field value is the value of that binding variable.</p>
+<p>Note that the result of <tt>SELECT *</tt> is different from the result of query that selects all the fields of an object.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT *
+FROM GleambookUsers user;
+</pre></div></div>
+
+<p>Since <tt>user</tt> is the only binding variable generated in the <tt>FROM</tt> clause, this query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;user&quot;: {
+        &quot;userSince&quot;: &quot;2012-08-20T10:10:00.000Z&quot;,
+        &quot;friendIds&quot;: [
+            2,
+            3,
+            6,
+            10
+        ],
+        &quot;gender&quot;: &quot;F&quot;,
+        &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+        &quot;nickname&quot;: &quot;Mags&quot;,
+        &quot;alias&quot;: &quot;Margarita&quot;,
+        &quot;id&quot;: 1,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Codetechno&quot;,
+                &quot;start-date&quot;: &quot;2006-08-06&quot;
+            },
+            {
+                &quot;end-date&quot;: &quot;2010-01-26&quot;,
+                &quot;organizationName&quot;: &quot;geomedia&quot;,
+                &quot;start-date&quot;: &quot;2010-06-17&quot;
+            }
+        ]
+    }
+}, {
+    &quot;user&quot;: {
+        &quot;userSince&quot;: &quot;2011-01-22T10:10:00.000Z&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            4
+        ],
+        &quot;name&quot;: &quot;IsbelDull&quot;,
+        &quot;nickname&quot;: &quot;Izzy&quot;,
+        &quot;alias&quot;: &quot;Isbel&quot;,
+        &quot;id&quot;: 2,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Hexviafind&quot;,
+                &quot;startDate&quot;: &quot;2010-04-27&quot;
+            }
+        ]
+    }
+}, {
+    &quot;user&quot;: {
+        &quot;userSince&quot;: &quot;2012-07-10T10:10:00.000Z&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            5,
+            8,
+            9
+        ],
+        &quot;name&quot;: &quot;EmoryUnk&quot;,
+        &quot;alias&quot;: &quot;Emory&quot;,
+        &quot;id&quot;: 3,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;geomedia&quot;,
+                &quot;endDate&quot;: &quot;2010-01-26&quot;,
+                &quot;startDate&quot;: &quot;2010-06-17&quot;
+            }
+        ]
+    }
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT *
+FROM GleambookUsers u, GleambookMessages m
+WHERE m.authorId = u.id and u.id = 2;
+</pre></div></div>
+
+<p>This query does an inner join that we will discuss in <a href="#Multiple_from_terms">multiple from terms</a>. Since both <tt>u</tt> and <tt>m</tt> are binding variables generated in the <tt>FROM</tt> clause, this query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;u&quot;: {
+        &quot;userSince&quot;: &quot;2011-01-22T10:10:00&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            4
+        ],
+        &quot;name&quot;: &quot;IsbelDull&quot;,
+        &quot;nickname&quot;: &quot;Izzy&quot;,
+        &quot;alias&quot;: &quot;Isbel&quot;,
+        &quot;id&quot;: 2,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Hexviafind&quot;,
+                &quot;startDate&quot;: &quot;2010-04-27&quot;
+            }
+        ]
+    },
+    &quot;m&quot;: {
+        &quot;senderLocation&quot;: [
+            31.5,
+            75.56
+        ],
+        &quot;inResponseTo&quot;: 1,
+        &quot;messageId&quot;: 6,
+        &quot;authorId&quot;: 2,
+        &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+    }
+}, {
+    &quot;u&quot;: {
+        &quot;userSince&quot;: &quot;2011-01-22T10:10:00&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            4
+        ],
+        &quot;name&quot;: &quot;IsbelDull&quot;,
+        &quot;nickname&quot;: &quot;Izzy&quot;,
+        &quot;alias&quot;: &quot;Isbel&quot;,
+        &quot;id&quot;: 2,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Hexviafind&quot;,
+                &quot;startDate&quot;: &quot;2010-04-27&quot;
+            }
+        ]
+    },
+    &quot;m&quot;: {
+        &quot;senderLocation&quot;: [
+            48.09,
+            81.01
+        ],
+        &quot;inResponseTo&quot;: 4,
+        &quot;messageId&quot;: 3,
+        &quot;authorId&quot;: 2,
+        &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+    }
+} ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="SELECT_DISTINCT"></a><a name="Select_distinct" id="Select_distinct">SELECT DISTINCT</a></h3>
+<p>SQL++&#x2019;s <tt>DISTINCT</tt> keyword is used to eliminate duplicate items in results. The following example shows how it works.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT DISTINCT * FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;foo&quot;: 1
+}, {
+    &quot;foo&quot;: 2
+}, {
+    &quot;foo&quot;: 3
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT DISTINCT VALUE foo FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+
+<p>This version of the query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ 1
+, 2
+, 3
+ ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Unnamed_Projections"></a><a name="Unnamed_projections" id="Unnamed_projections">Unnamed Projections</a></h3>
+<p>Similar to standard SQL, SQL++ supports unnamed projections (a.k.a, unnamed <tt>SELECT</tt> clause items), for which names are generated. Name generation has three cases:</p>
+<ul>
+
+<li>If a projection expression is a variable reference expression, its generated name is the name of the variable.</li>
+<li>If a projection expression is a field access expression, its generated name is the last identifier in the expression.</li>
+<li>For all other cases, the query processor will generate a unique name.</li>
+</ul>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT substr(user.name, 10), user.alias
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+
+<p>This query outputs:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;alias&quot;: &quot;Margarita&quot;,
+    &quot;$1&quot;: &quot;Stoddard&quot;
+} ]
+</pre></div></div>
+
+<p>In the result, <tt>$1</tt> is the generated name for <tt>substr(user.name, 1)</tt>, while <tt>alias</tt> is the generated name for <tt>user.alias</tt>.</p></div></div></div>
+<div class="section">
+<h3><a name="Abbreviated_Field_Access_Expressions"></a><a name="Abbreviated_field_access_expressions" id="Abbreviated_field_access_expressions">Abbreviated Field Access Expressions</a></h3>
+<p>As in standard SQL, SQL++ field access expressions can be abbreviated (not recommended!) when there is no ambiguity. In the next example, the variable <tt>user</tt> is the only possible variable reference for fields <tt>id</tt>, <tt>name</tt> and <tt>alias</tt> and thus could be omitted in the query. More information on abbbreviated field access can be found in the appendix section on Variable Resolution.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT substr(name, 10) AS lname, alias
+FROM GleambookUsers user
+WHERE id = 1;
+</pre></div></div>
+
+<p>Outputs:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;lname&quot;: &quot;Stoddard&quot;,
+    &quot;alias&quot;: &quot;Margarita&quot;
+} ]
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="UNNEST_Clause"></a><a name="Unnest_clauses" id="Unnest_clauses">UNNEST Clause</a></h2>
+<p>For each of its input tuples, the <tt>UNNEST</tt> clause flattens a collection-valued expression into individual items, producing multiple tuples, each of which is one of the expression&#x2019;s original input tuples augmented with a flattened item from its collection.</p>
+<div class="section">
+<h3><a name="Inner_UNNEST"></a><a name="Inner_unnests" id="Inner_unnests">Inner UNNEST</a></h3>
+<p>The following example is a query that retrieves the names of the organizations that a selected user has worked for. It uses the <tt>UNNEST</tt> clause to unnest the nested collection <tt>employment</tt> in the user&#x2019;s object.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.id AS userId, e.organizationName AS orgName
+FROM GleambookUsers u
+UNNEST u.employment e
+WHERE u.id = 1;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;orgName&quot;: &quot;Codetechno&quot;,
+    &quot;userId&quot;: 1
+}, {
+    &quot;orgName&quot;: &quot;geomedia&quot;,
+    &quot;userId&quot;: 1
+} ]
+</pre></div></div>
+
+<p>Note that <tt>UNNEST</tt> has SQL&#x2019;s inner join semantics &#x2014; that is, if a user has no employment history, no tuple corresponding to that user will be emitted in the result.</p></div></div></div>
+<div class="section">
+<h3><a name="Left_Outer_UNNEST"></a><a name="Left_outer_unnests" id="Left_outer_unnests">Left Outer UNNEST</a></h3>
+<p>As an alternative, the <tt>LEFT OUTER UNNEST</tt> clause offers SQL&#x2019;s left outer join semantics. For example, no collection-valued field named <tt>hobbies</tt> exists in the object for the user whose id is 1, but the following query&#x2019;s result still includes user 1.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.id AS userId, h.hobbyName AS hobby
+FROM GleambookUsers u
+LEFT OUTER UNNEST u.hobbies h
+WHERE u.id = 1;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;userId&quot;: 1
+} ]
+</pre></div></div>
+
+<p>Note that if <tt>u.hobbies</tt> is an empty collection or leads to a <tt>MISSING</tt> (as above) or <tt>NULL</tt> value for a given input tuple, there is no corresponding binding value for variable <tt>h</tt> for an input tuple. A <tt>MISSING</tt> value will be generated for <tt>h</tt> so that the input tuple can still be propagated.</p></div></div></div>
+<div class="section">
+<h3><a name="Expressing_Joins_Using_UNNEST"></a><a name="Expressing_joins_using_unnests" id="Expressing_joins_using_unnests">Expressing Joins Using UNNEST</a></h3>
+<p>The SQL++ <tt>UNNEST</tt> clause is similar to SQL&#x2019;s <tt>JOIN</tt> clause except that it allows its right argument to be correlated to its left argument, as in the examples above &#x2014; i.e., think &#x201c;correlated cross-product&#x201d;. The next example shows this via a query that joins two data sets, GleambookUsers and GleambookMessages, returning user/message pairs. The results contain one object per pair, with result objects containing the user&#x2019;s name and an entire message. The query can be thought of as saying &#x201c;for each Gleambook user, unnest the <tt>GleambookMessages</tt> collection and filter the output with the condition <tt>message.authorId = user.id</tt>&#x201d;.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u
+UNNEST GleambookMessages m
+WHERE m.authorId = u.id;
+</pre></div></div>
+
+<p>This returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+} ]
+</pre></div></div>
+
+<p>Similarly, the above query can also be expressed as the <tt>UNNEST</tt>ing of a correlated SQL++ subquery:</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u
+UNNEST (
+    SELECT VALUE msg
+    FROM GleambookMessages msg
+    WHERE msg.authorId = u.id
+) AS m;
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="FROM_clauses"></a><a name="From_clauses" id="From_clauses">FROM clauses</a></h2>
+<p>A <tt>FROM</tt> clause is used for enumerating (i.e., conceptually iterating over) the contents of collections, as in SQL.</p>
+<div class="section">
+<h3><a name="Binding_expressions" id="Binding_expressions">Binding expressions</a></h3>
+<p>In SQL++, in addition to stored collections, a <tt>FROM</tt> clause can iterate over any intermediate collection returned by a valid SQL++ expression. In the tuple stream generated by a <tt>FROM</tt> clause, the ordering of the input tuples are not guaranteed to be preserved.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT VALUE foo
+FROM [1, 2, 2, 3] AS foo
+WHERE foo &gt; 2;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[
+  3
+]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Multiple_FROM_Terms"></a><a name="Multiple_from_terms" id="Multiple_from_terms">Multiple FROM Terms</a></h3>
+<p>SQL++ permits correlations among <tt>FROM</tt> terms. Specifically, a <tt>FROM</tt> binding expression can refer to variables defined to its left in the given <tt>FROM</tt> clause. Thus, the first unnesting example above could also be expressed as follows:</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.id AS userId, e.organizationName AS orgName
+FROM GleambookUsers u, u.employment e
+WHERE u.id = 1;
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Expressing_Joins_Using_FROM_Terms"></a><a name="Expressing_joins_using_from_terms" id="Expressing_joins_using_from_terms">Expressing Joins Using FROM Terms</a></h3>
+<p>Similarly, the join intentions of the other <tt>UNNEST</tt>-based join examples above could be expressed as:</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u, GleambookMessages m
+WHERE m.authorId = u.id;
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u,
+  (
+    SELECT VALUE msg
+    FROM GleambookMessages msg
+    WHERE msg.authorId = u.id
+  ) AS m;
+</pre></div></div>
+
+<p>Note that the first alternative is one of the SQL-92 approaches to expressing a join.</p></div></div></div>
+<div class="section">
+<h3><a name="Implicit_Binding_Variables"></a><a name="Implicit_binding_variables" id="Implicit_binding_variables">Implicit Binding Variables</a></h3>
+<p>Similar to standard SQL, SQL++ supports implicit <tt>FROM</tt> binding variables (i.e., aliases), for which a binding variable is generated. SQL++ variable generation falls into three cases:</p>
+<ul>
+
+<li>If the binding expression is a variable reference expression, the generated variable&#x2019;s name will be the name of the referenced variable itself.</li>
+<li>If the binding expression is a field access expression (or a fully qualified name for a dataset), the generated variable&#x2019;s name will be the last identifier (or the dataset name) in the expression.</li>
+<li>For all other cases, a compilation error will be raised.</li>
+</ul>
+<p>The next two examples show queries that do not provide binding variables in their <tt>FROM</tt> clauses.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers, GleambookMessages
+WHERE GleambookMessages.authorId = GleambookUsers.id;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers,
+  (
+    SELECT VALUE GleambookMessages
+    FROM GleambookMessages
+    WHERE GleambookMessages.authorId = GleambookUsers.id
+  );
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">Error: &quot;Syntax error: Need an alias for the enclosed expression:\n(select element GleambookMessages\n    from GleambookMessages as GleambookMessages\n    where (GleambookMessages.authorId = GleambookUsers.id)\n )&quot;,
+    &quot;query_from_user&quot;: &quot;use TinySocial;\n\nSELECT GleambookUsers.name, GleambookMessages.message\n    FROM GleambookUsers,\n      (\n        SELECT VALUE GleambookMessages\n        FROM GleambookMessages\n        WHERE GleambookMessages.authorId = GleambookUsers.id\n      );&quot;
+</pre></div></div>
+
+<p>More information on implicit binding variables can be found in the appendix section on Variable Resolution.</p></div></div></div></div>
+<div class="section">
+<h2><a name="JOIN_Clauses"></a><a name="Join_clauses" id="Join_clauses">JOIN Clauses</a></h2>
+<p>The join clause in SQL++ supports both inner joins and left outer joins from standard SQL.</p>
+<div class="section">
+<h3><a name="Inner_joins" id="Inner_joins">Inner joins</a></h3>
+<p>Using a <tt>JOIN</tt> clause, the inner join intent from the preceeding examples can also be expressed as follows:</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u JOIN GleambookMessages m ON m.authorId = u.id;
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Left_Outer_Joins"></a><a name="Left_outer_joins" id="Left_outer_joins">Left Outer Joins</a></h3>
+<p>SQL++ supports SQL&#x2019;s notion of left outer join. The following query is an example:</p>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u LEFT OUTER JOIN GleambookMessages m ON m.authorId = u.id;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+}, {
+    &quot;uname&quot;: &quot;EmoryUnk&quot;
+} ]
+</pre></div></div>
+
+<p>For non-matching left-side tuples, SQL++ produces <tt>MISSING</tt> values for the right-side binding variables; that is why the last object in the above result doesn&#x2019;t have a <tt>message</tt> field. Note that this is slightly different from standard SQL, which instead would fill in <tt>NULL</tt> values for the right-side fields. The reason for this difference is that, for non-matches in its join results, SQL++ views fields from the right-side as being &#x201c;not there&#x201d; (a.k.a. <tt>MISSING</tt>) instead of as being &#x201c;there but unknown&#x201d; (i.e., <tt>NULL</tt>).</p>
+<p>The left-outer join query can also be expressed using <tt>LEFT OUTER UNNEST</tt>:</p>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u
+LEFT OUTER UNNEST (
+    SELECT VALUE message
+    FROM GleambookMessages message
+    WHERE message.authorId = u.id
+  ) m;
+</pre></div></div>
+
+<p>In general, in SQL++, SQL-style join queries can also be expressed by <tt>UNNEST</tt> clauses and left outer join queries can be expressed by <tt>LEFT OUTER UNNESTs</tt>.</p></div></div>
+<div class="section">
+<h2><a name="GROUP_BY_Clauses"></a><a name="Group_By_clauses" id="Group_By_clauses">GROUP BY Clauses</a></h2>
+<p>The SQL++ <tt>GROUP BY</tt> clause generalizes standard SQL&#x2019;s grouping and aggregation semantics, but it also retains backward compatibility with the standard (relational) SQL <tt>GROUP BY</tt> and aggregation features.</p>
+<div class="section">
+<h3><a name="Group_variables" id="Group_variables">Group variables</a></h3>
+<p>In a <tt>GROUP BY</tt> clause, in addition to the binding variable(s) defined for the grouping key(s), SQL++ allows a user to define a <i>group variable</i> by using the clause&#x2019;s <tt>GROUP AS</tt> extension to denote the resulting group. After grouping, then, the query&#x2019;s in-scope variables include the grouping key&#x2019;s binding variables as well as this group variable which will be bound to one collection value for each group. This per-group collection (i.e., multiset) value will be a set of nested objects in which each field of the object is the result of a renamed variable defined in parentheses following the group variable&#x2019;s name. The <tt>GROUP AS</tt> syntax is as follows:</p>
+
+<div>
+<div>
+<pre class="source">&lt;GROUP&gt; &lt;AS&gt; Variable (&quot;(&quot; VariableReference &lt;AS&gt; Identifier (&quot;,&quot; VariableReference &lt;AS&gt; Identifier )* &quot;)&quot;)?
+</pre></div></div>
+
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT *
+FROM GleambookMessages message
+GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+</pre></div></div>
+
+<p>This first example query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;msgs&quot;: [
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    38.97,
+                    77.49
+                ],
+                &quot;inResponseTo&quot;: 1,
+                &quot;messageId&quot;: 11,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    41.66,
+                    80.87
+                ],
+                &quot;inResponseTo&quot;: 4,
+                &quot;messageId&quot;: 2,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    37.73,
+                    97.04
+                ],
+                &quot;inResponseTo&quot;: 2,
+                &quot;messageId&quot;: 4,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    40.33,
+                    80.87
+                ],
+                &quot;inResponseTo&quot;: 11,
+                &quot;messageId&quot;: 8,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    42.5,
+                    70.01
+                ],
+                &quot;inResponseTo&quot;: 12,
+                &quot;messageId&quot;: 10,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+            }
+        }
+    ],
+    &quot;uid&quot;: 1
+}, {
+    &quot;msgs&quot;: [
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    31.5,
+                    75.56
+                ],
+                &quot;inResponseTo&quot;: 1,
+                &quot;messageId&quot;: 6,
+                &quot;authorId&quot;: 2,
+                &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [


<TRUNCATED>

[02/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/sqlpp/manual.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/sqlpp/manual.html b/docs/0.9.4/sqlpp/manual.html
new file mode 100644
index 0000000..8d8b5df
--- /dev/null
+++ b/docs/0.9.4/sqlpp/manual.html
@@ -0,0 +1,4215 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/sqlpp/manual.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; The SQL++ Query Language</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 class="active"><a href="#"><span class="none"></span>The SQL++ Query Language</a></li>
+    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><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>The SQL++ Query Language</h1>
+<ul>
+
+<li><a href="#Introduction">1. Introduction</a></li>
+<li><a href="#Expressions">2. Expressions</a>
+<ul>
+
+<li><a href="#Operator_expressions">Operator Expressions</a>
+<ul>
+
+<li><a href="#Arithmetic_operators">Arithmetic Operators</a></li>
+<li><a href="#Collection_operators">Collection Operators</a></li>
+<li><a href="#Comparison_operators">Comparison Operators</a></li>
+<li><a href="#Logical_operators">Logical Operators</a></li>
+</ul>
+</li>
+<li><a href="#Case_expressions">Case Expressions</a></li>
+<li><a href="#Quantified_expressions">Quantified Expressions</a></li>
+<li><a href="#Path_expressions">Path Expressions</a></li>
+<li><a href="#Primary_expressions">Primary Expressions</a>
+<ul>
+
+<li><a href="#Literals">Literals</a></li>
+<li><a href="#Variable_references">Variable References</a></li>
+<li><a href="#Parenthesized_expressions">Parenthesized Expressions</a></li>
+<li><a href="#Function_call_expressions">Function call Expressions</a></li>
+<li><a href="#Constructors">Constructors</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#Queries">3. Queries</a>
+<ul>
+
+<li><a href="#Declarations">Declarations</a></li>
+<li><a href="#SELECT_statements">SELECT Statements</a></li>
+<li><a href="#Select_clauses">SELECT Clauses</a>
+<ul>
+
+<li><a href="#Select_element">Select Element/Value/Raw</a></li>
+<li><a href="#SQL_select">SQL-style Select</a></li>
+<li><a href="#Select_star">Select *</a></li>
+<li><a href="#Select_distinct">Select Distinct</a></li>
+<li><a href="#Unnamed_projections">Unnamed Projections</a></li>
+<li><a href="#Abbreviated_field_access_expressions">Abbreviated Field Access Expressions</a></li>
+</ul>
+</li>
+<li><a href="#Unnest_clauses">UNNEST Clauses</a>
+<ul>
+
+<li><a href="#Inner_unnests">Inner Unnests</a></li>
+<li><a href="#Left_outer_unnests">Left Outer Unnests</a></li>
+<li><a href="#Expressing_joins_using_unnests">Expressing Joins Using Unnests</a></li>
+</ul>
+</li>
+<li><a href="#From_clauses">FROM clauses</a>
+<ul>
+
+<li><a href="#Binding_expressions">Binding Expressions</a></li>
+<li><a href="#Multiple_from_terms">Multiple From Terms</a></li>
+<li><a href="#Expressing_joins_using_from_terms">Expressing Joins Using From Terms</a></li>
+<li><a href="#Implicit_binding_variables">Implicit Binding Variables</a></li>
+</ul>
+</li>
+<li><a href="#Join_clauses">JOIN Clauses</a>
+<ul>
+
+<li><a href="#Inner_joins">Inner Joins</a></li>
+<li><a href="#Left_outer_joins">Left Outer Joins</a></li>
+</ul>
+</li>
+<li><a href="#Group_By_clauses">GROUP BY Clauses</a>
+<ul>
+
+<li><a href="#Group_variables">Group Variables</a></li>
+<li><a href="#Implicit_group_key_variables">Implicit Group Key Variables</a></li>
+<li><a href="#Implicit_group_variables">Implicit Group Variables</a></li>
+<li><a href="#Aggregation_functions">Aggregation Functions</a></li>
+<li><a href="#SQL-92_aggregation_functions">SQL-92 Aggregation Functions</a></li>
+<li><a href="#SQL-92_compliant_gby">SQL-92 Compliant GROUP BY Aggregations</a></li>
+<li><a href="#Column_aliases">Column Aliases</a></li>
+</ul>
+</li>
+<li><a href="#Where_having_clauses">WHERE Clauses and HAVING Clauses</a></li>
+<li><a href="#Order_By_clauses">ORDER BY Clauses</a></li>
+<li><a href="#Limit_clauses">LIMIT Clauses</a></li>
+<li><a href="#With_clauses">WITH Clauses</a></li>
+<li><a href="#Let_clauses">LET Clauses</a></li>
+<li><a href="#Union_all">UNION ALL</a></li>
+<li><a href="#Vs_SQL-92">SQL++ Vs. SQL-92</a></li>
+</ul>
+</li>
+<li><a href="#Errors">4. Errors</a>
+<ul>
+
+<li><a href="#Syntax_errors">Syntax Errors</a></li>
+<li><a href="#Identifier_resolution_errors">Identifier Resolution Errors</a></li>
+<li><a href="#Type_errors">Type Errors</a></li>
+<li><a href="#Resource_errors">Resource Errors</a></li>
+</ul>
+</li>
+<li><a href="#DDL_and_DML_statements">5. DDL and DML Statements</a>
+<ul>
+
+<li><a href="#Lifecycle_management_statements">Lifecycle Management Statements</a>
+<ul>
+
+<li><a href="#Dataverses">Dataverses</a></li>
+<li><a href="#Types">Types</a></li>
+<li><a href="#Datasets">Datasets</a></li>
+<li><a href="#Indices">Indices</a></li>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Removal">Removal</a></li>
+<li><a href="#Load_statement">Load Statement</a></li>
+</ul>
+</li>
+<li><a href="#Modification_statements">Modification Statements</a>
+<ul>
+
+<li><a href="#Inserts">Inserts</a></li>
+<li><a href="#Upserts">Upserts</a></li>
+<li><a href="#Deletes">Deletes</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#Reserved_keywords">Appendix 1. Reserved Keywords</a></li>
+<li><a href="#Performance_tuning">Appendix 2. Performance Tuning</a>
+<ul>
+
+<li><a href="#Parallelism_parameter">Parallelism Parameter</a></li>
+<li><a href="#Memory_parameters">Memory Parameters</a></li>
+</ul>
+</li>
+<li><a href="#Variable_bindings_and_name_resolution">Appendix 3. Variable Bindings and Name Resolution</a></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.
+ !-->
+
+<h1><a name="Introduction" id="Introduction">1. Introduction</a><font size="3" /></h1>
+<p>This document is intended as a reference guide to the full syntax and semantics of the SQL++ Query Language, a SQL-inspired language for working with semistructured data. SQL++ has much in common with SQL, but some differences do exist due to the different data models that the two languages were designed to serve. SQL was designed in the 1970&#x2019;s for interacting with the flat, schema-ified world of relational databases, while SQL++ is much newer and targets the nested, schema-optional (or even schema-less) world of modern NoSQL systems.</p>
+<p>In the context of Apache AsterixDB, SQL++ is intended for working with the Asterix Data Model (<a href="../datamodel.html">ADM</a>),a data model based on a superset of JSON with an enriched and flexible type system. New AsterixDB users are encouraged to read and work through the (much friendlier) guide &#x201c;<a href="primer-sqlpp.html">AsterixDB 101: An ADM and SQL++ Primer</a>&#x201d; before attempting to make use of this document. In addition, readers are advised to read through the <a href="../datamodel.html">Asterix Data Model (ADM) reference guide</a> first as well, as an understanding of the data model is a prerequisite to understanding SQL++.</p>
+<p>In what follows, we detail the features of the SQL++ language in a grammar-guided manner. We list and briefly explain each of the productions in the SQL++ grammar, offering examples (and results) for clarity.</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.
+ !-->
+
+<h1><a name="Expressions" id="Expressions">2. Expressions</a></h1><!--
+ ! 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.
+ !-->
+
+<p>SQL++ is a highly composable expression language. Each SQL++ expression returns zero or more data model instances. There are three major kinds of expressions in SQL++. At the topmost level, a SQL++ expression can be an OperatorExpression (similar to a mathematical expression), an ConditionalExpression (to choose between alternative values), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we explore the full SQL++ grammar.</p>
+
+<div>
+<div>
+<pre class="source">Expression ::= OperatorExpression | CaseExpression | QuantifiedExpression
+</pre></div></div>
+
+<p>Note that in the following text, words enclosed in angle brackets denote keywords that are not case-sensitive.</p>
+<div class="section">
+<h2><a name="Operator_Expressions"></a><a name="Operator_expressions" id="Operator_expressions">Operator Expressions</a></h2>
+<p>Operators perform a specific operation on the input values or expressions. The syntax of an operator expression is as follows:</p>
+
+<div>
+<div>
+<pre class="source">OperatorExpression ::= PathExpression
+                       | Operator OperatorExpression
+                       | OperatorExpression Operator (OperatorExpression)?
+                       | OperatorExpression &lt;BETWEEN&gt; OperatorExpression &lt;AND&gt; OperatorExpression
+</pre></div></div>
+
+<p>SQL++ provides a full set of operators that you can use within its statements. Here are the categories of operators:</p>
+<ul>
+
+<li><a href="#Arithmetic_operators">Arithmetic Operators</a>, to perform basic mathematical operations;</li>
+<li><a href="#Collection_operators">Collection Operators</a>, to evaluate expressions on collections or objects;</li>
+<li><a href="#Comparison_operators">Comparison Operators</a>, to compare two expressions;</li>
+<li><a href="#Logical_operators">Logical Operators</a>, to combine operators using Boolean logic.</li>
+</ul>
+<p>The following table summarizes the precedence order (from higher to lower) of the major unary and binary operators:</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator                                                                    </th>
+<th> Operation </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> EXISTS, NOT EXISTS                                                          </td>
+<td>  Collection emptiness testing </td></tr>
+<tr class="a">
+<td> ^                                                                           </td>
+<td>  Exponentiation  </td></tr>
+<tr class="b">
+<td> *, /, %                                                                     </td>
+<td>  Multiplication, division, modulo </td></tr>
+<tr class="a">
+<td> +, -                                                                        </td>
+<td>  Addition, subtraction  </td></tr>
+<tr class="b">
+<td> ||                                                                          </td>
+<td>  String concatenation </td></tr>
+<tr class="a">
+<td> IS NULL, IS NOT NULL, IS MISSING, IS NOT MISSING, <br />IS UNKNOWN, IS NOT UNKNOWN, IS VALUED, IS NOT VALUED </td>
+<td> Unknown value comparison </td></tr>
+<tr class="b">
+<td> BETWEEN, NOT BETWEEN                                                        </td>
+<td> Range comparison (inclusive on both sides) </td></tr>
+<tr class="a">
+<td> =, !=, &lt;&gt;, &lt;, &gt;, &lt;=, &gt;=, LIKE, NOT LIKE, IN, NOT IN                             </td>
+<td> Comparison  </td></tr>
+<tr class="b">
+<td> NOT                                                                         </td>
+<td> Logical negation </td></tr>
+<tr class="a">
+<td> AND                                                                         </td>
+<td> Conjunction </td></tr>
+<tr class="b">
+<td> OR                                                                          </td>
+<td> Disjunction </td></tr>
+</tbody>
+</table>
+<p>In general, if any operand evaluates to a <tt>MISSING</tt> value, the enclosing operator will return <tt>MISSING</tt>; if none of operands evaluates to a <tt>MISSING</tt> value but there is an operand evaluates to a <tt>NULL</tt> value, the enclosing operator will return <tt>NULL</tt>. However, there are a few exceptions listed in <a href="#Comparison_operators">comparison operators</a> and <a href="#Logical_operators">logical operators</a>.</p>
+<div class="section">
+<h3><a name="Arithmetic_Operators"></a><a name="Arithmetic_operators" id="Arithmetic_operators">Arithmetic Operators</a></h3>
+<p>Arithmetic operators are used to exponentiate, add, subtract, multiply, and divide numeric values, or concatenate string values.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator     </th>
+<th>  Purpose                                                                </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> +, -         </td>
+<td>  As unary operators, they denote a <br />positive or negative expression </td>
+<td> SELECT VALUE -1; </td></tr>
+<tr class="a">
+<td> +, -         </td>
+<td>  As binary operators, they add or subtract                              </td>
+<td> SELECT VALUE 1 + 2; </td></tr>
+<tr class="b">
+<td> *, /, %      </td>
+<td>  Multiply, divide, modulo                                               </td>
+<td> SELECT VALUE 4 / 2.0; </td></tr>
+<tr class="a">
+<td> ^            </td>
+<td>  Exponentiation                                                         </td>
+<td> SELECT VALUE 2^3;       </td></tr>
+<tr class="b">
+<td> || </td>
+<td>  String concatenation                                                   </td>
+<td> SELECT VALUE &#x201c;ab&#x201d;||&#x201c;c&#x201d;||&#x201c;d&#x201d;;       </td></tr>
+</tbody>
+</table></div>
+<div class="section">
+<h3><a name="Collection_Operators"></a><a name="Collection_operators" id="Collection_operators">Collection Operators</a></h3>
+<p>Collection operators are used for membership tests (IN, NOT IN) or empty collection tests (EXISTS, NOT EXISTS).</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator   </th>
+<th>  Purpose                                     </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> IN         </td>
+<td>  Membership test                             </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.lang IN [&#x201c;en&#x201d;, &#x201c;de&#x201d;]; </td></tr>
+<tr class="a">
+<td> NOT IN     </td>
+<td>  Non-membership test                         </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.lang NOT IN [&#x201c;en&#x201d;]; </td></tr>
+<tr class="b">
+<td> EXISTS     </td>
+<td>  Check whether a collection is not empty     </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE EXISTS cm.referredTopics; </td></tr>
+<tr class="a">
+<td> NOT EXISTS </td>
+<td>  Check whether a collection is empty         </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE NOT EXISTS cm.referredTopics; </td></tr>
+</tbody>
+</table></div>
+<div class="section">
+<h3><a name="Comparison_Operators"></a><a name="Comparison_operators" id="Comparison_operators">Comparison Operators</a></h3>
+<p>Comparison operators are used to compare values. The comparison operators fall into one of two sub-categories: missing value comparisons and regular value comparisons. SQL++ (and JSON) has two ways of representing missing information in a object - the presence of the field with a NULL for its value (as in SQL), and the absence of the field (which JSON permits). For example, the first of the following objects represents Jack, whose friend is Jill. In the other examples, Jake is friendless a la SQL, with a friend field that is NULL, while Joe is friendless in a more natural (for JSON) way, i.e., by not having a friend field.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+<p>{&#x201c;name&#x201d;: &#x201c;Jack&#x201d;, &#x201c;friend&#x201d;: &#x201c;Jill&#x201d;}</p>
+<p>{&#x201c;name&#x201d;: &#x201c;Jake&#x201d;, &#x201c;friend&#x201d;: NULL}</p>
+<p>{&#x201c;name&#x201d;: &#x201c;Joe&#x201d;}</p>
+<p>The following table enumerates all of SQL++&#x2019;s comparison operators.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator       </th>
+<th>  Purpose                                   </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> IS NULL        </td>
+<td>  Test if a value is NULL                       </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NULL; </td></tr>
+<tr class="a">
+<td> IS NOT NULL    </td>
+<td>  Test if a value is not NULL                   </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT NULL; </td></tr>
+<tr class="b">
+<td> IS MISSING     </td>
+<td>  Test if a value is MISSING                    </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS MISSING; </td></tr>
+<tr class="a">
+<td> IS NOT MISSING </td>
+<td>  Test if a value is not MISSING                </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT MISSING;</td></tr>
+<tr class="b">
+<td> IS UNKNOWN     </td>
+<td>  Test if a value is NULL or MISSING            </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS UNKNOWN; </td></tr>
+<tr class="a">
+<td> IS NOT UNKNOWN </td>
+<td>  Test if a value is neither NULL nor MISSING   </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT UNKNOWN;</td></tr>
+<tr class="b">
+<td> IS VALUED      </td>
+<td>  Test if a value is neither NULL nor MISSING   </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS VALUED; </td></tr>
+<tr class="a">
+<td> IS NOT VALUED  </td>
+<td>  Test if a value is NULL or MISSING            </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name IS NOT VALUED;</td></tr>
+<tr class="b">
+<td> BETWEEN        </td>
+<td>  Test if a value is between a start value and <br />a end value. The comparison is inclusive <br />to both start and end values. </td>
+<td>  SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId BETWEEN 10 AND 20;</td></tr>
+<tr class="a">
+<td> =              </td>
+<td>  Equality test                                 </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId=10; </td></tr>
+<tr class="b">
+<td> !=             </td>
+<td>  Inequality test                               </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId!=10;</td></tr>
+<tr class="a">
+<td> &lt;&gt;             </td>
+<td>  Inequality test                               </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;&gt;10;</td></tr>
+<tr class="b">
+<td> &lt;              </td>
+<td>  Less than                                     </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;10; </td></tr>
+<tr class="a">
+<td> &gt;              </td>
+<td>  Greater than                                  </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&gt;10; </td></tr>
+<tr class="b">
+<td> &lt;=             </td>
+<td>  Less than or equal to                         </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;=10; </td></tr>
+<tr class="a">
+<td> &gt;=             </td>
+<td>  Greater than or equal to                      </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&gt;=10; </td></tr>
+<tr class="b">
+<td> LIKE           </td>
+<td>  Test if the left side matches a<br /> pattern defined on the right<br /> side; in the pattern,  &#x201c;%&#x201d; matches  <br />any string while &#x201c;_&#x201d; matches <br /> any character. </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name LIKE &#x201c;%Giesen%&#x201d;;</td></tr>
+<tr class="a">
+<td> NOT LIKE       </td>
+<td>  Test if the left side does not <br />match a pattern defined on the right<br /> side; in the pattern,  &#x201c;%&#x201d; matches <br />any string while &#x201c;_&#x201d; matches <br /> any character. </td>
+<td> SELECT * FROM ChirpMessages cm <br />WHERE cm.user.name NOT LIKE &#x201c;%Giesen%&#x201d;;</td></tr>
+</tbody>
+</table>
+<p>The following table summarizes how the missing value comparison operators work.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator </th>
+<th> Non-NULL/Non-MISSING value </th>
+<th> NULL </th>
+<th> MISSING </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> IS NULL  </td>
+<td> FALSE </td>
+<td> TRUE </td>
+<td> MISSING </td></tr>
+<tr class="a">
+<td> IS NOT NULL </td>
+<td> TRUE </td>
+<td> FALSE </td>
+<td> MISSING </td></tr>
+<tr class="b">
+<td> IS MISSING  </td>
+<td> FALSE </td>
+<td> FALSE </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> IS NOT MISSING </td>
+<td> TRUE </td>
+<td> TRUE </td>
+<td> FALSE </td></tr>
+<tr class="b">
+<td> IS UNKNOWN </td>
+<td> FALSE </td>
+<td> TRUE </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> IS NOT UNKNOWN </td>
+<td> TRUE </td>
+<td> FALSE </td>
+<td> FALSE</td></tr>
+<tr class="b">
+<td> IS VALUED </td>
+<td> TRUE </td>
+<td> FALSE </td>
+<td> FALSE </td></tr>
+<tr class="a">
+<td> IS NOT VALUED </td>
+<td> FALSE </td>
+<td> TRUE </td>
+<td> TRUE </td></tr>
+</tbody>
+</table></div></div></div>
+<div class="section">
+<h3><a name="Logical_Operators"></a><a name="Logical_operators" id="Logical_operators">Logical Operators</a></h3>
+<p>Logical operators perform logical <tt>NOT</tt>, <tt>AND</tt>, and <tt>OR</tt> operations over Boolean values (<tt>TRUE</tt> and <tt>FALSE</tt>) plus <tt>NULL</tt> and <tt>MISSING</tt>.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> Operator </th>
+<th>  Purpose                                   </th>
+<th> Example    </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> NOT      </td>
+<td>  Returns true if the following condition is false, otherwise returns false  </td>
+<td> SELECT VALUE NOT TRUE;  </td></tr>
+<tr class="a">
+<td> AND      </td>
+<td>  Returns true if both branches are true, otherwise returns false            </td>
+<td> SELECT VALUE TRUE AND FALSE; </td></tr>
+<tr class="b">
+<td> OR       </td>
+<td>  Returns true if one branch is true, otherwise returns false                </td>
+<td> SELECT VALUE FALSE OR FALSE; </td></tr>
+</tbody>
+</table>
+<p>The following table is the truth table for <tt>AND</tt> and <tt>OR</tt>.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> A  </th>
+<th> B  </th>
+<th> A AND B  </th>
+<th> A OR B </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> TRUE </td>
+<td> TRUE </td>
+<td> TRUE </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> TRUE </td>
+<td> FALSE </td>
+<td> FALSE </td>
+<td> TRUE </td></tr>
+<tr class="b">
+<td> TRUE </td>
+<td> NULL </td>
+<td> NULL </td>
+<td> TRUE </td></tr>
+<tr class="a">
+<td> TRUE </td>
+<td> MISSING </td>
+<td> MISSING </td>
+<td> TRUE </td></tr>
+<tr class="b">
+<td> FALSE </td>
+<td> FALSE </td>
+<td> FALSE </td>
+<td> FALSE </td></tr>
+<tr class="a">
+<td> FALSE </td>
+<td> NULL </td>
+<td> FALSE </td>
+<td> NULL </td></tr>
+<tr class="b">
+<td> FALSE </td>
+<td> MISSING </td>
+<td> FALSE </td>
+<td> MISSING </td></tr>
+<tr class="a">
+<td> NULL </td>
+<td> NULL </td>
+<td> NULL </td>
+<td> NULL </td></tr>
+<tr class="b">
+<td> NULL </td>
+<td> MISSING </td>
+<td> MISSING </td>
+<td> NULL </td></tr>
+<tr class="a">
+<td> MISSING </td>
+<td> MISSING </td>
+<td> MISSING </td>
+<td> MISSING </td></tr>
+</tbody>
+</table>
+<p>The following table demonstrates the results of <tt>NOT</tt> on all possible inputs.</p>
+<table border="0" class="table table-striped">
+<thead>
+
+<tr class="a">
+<th> A  </th>
+<th> NOT A </th></tr>
+</thead><tbody>
+
+<tr class="b">
+<td> TRUE </td>
+<td> FALSE </td></tr>
+<tr class="a">
+<td> FALSE </td>
+<td> TRUE </td></tr>
+<tr class="b">
+<td> NULL </td>
+<td> NULL </td></tr>
+<tr class="a">
+<td> MISSING </td>
+<td> MISSING </td></tr>
+</tbody>
+</table></div></div>
+<div class="section">
+<h2><a name="Case_Expressions"></a><a name="Case_expressions" id="Case_expressions">Case Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">CaseExpression ::= SimpleCaseExpression | SearchedCaseExpression
+SimpleCaseExpression ::= &lt;CASE&gt; Expression ( &lt;WHEN&gt; Expression &lt;THEN&gt; Expression )+ ( &lt;ELSE&gt; Expression )? &lt;END&gt;
+SearchedCaseExpression ::= &lt;CASE&gt; ( &lt;WHEN&gt; Expression &lt;THEN&gt; Expression )+ ( &lt;ELSE&gt; Expression )? &lt;END&gt;
+</pre></div></div>
+
+<p>In a simple <tt>CASE</tt> expression, the query evaluator searches for the first <tt>WHEN</tt> &#x2026; <tt>THEN</tt> pair in which the <tt>WHEN</tt> expression is equal to the expression following <tt>CASE</tt> and returns the expression following <tt>THEN</tt>. If none of the <tt>WHEN</tt> &#x2026; <tt>THEN</tt> pairs meet this condition, and an <tt>ELSE</tt> branch exists, it returns the <tt>ELSE</tt> expression. Otherwise, <tt>NULL</tt> is returned.</p>
+<p>In a searched CASE expression, the query evaluator searches from left to right until it finds a <tt>WHEN</tt> expression that is evaluated to <tt>TRUE</tt>, and then returns its corresponding <tt>THEN</tt> expression. If no condition is found to be <tt>TRUE</tt>, and an <tt>ELSE</tt> branch exists, it returns the <tt>ELSE</tt> expression. Otherwise, it returns <tt>NULL</tt>.</p>
+<p>The following example illustrates the form of a case expression.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">CASE (2 &lt; 3) WHEN true THEN &quot;yes&quot; ELSE &quot;no&quot; END
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="Quantified_Expressions"></a><a name="Quantified_expressions" id="Quantified_expressions">Quantified Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">QuantifiedExpression ::= ( (&lt;ANY&gt;|&lt;SOME&gt;) | &lt;EVERY&gt; ) Variable &lt;IN&gt; Expression ( &quot;,&quot; Variable &quot;in&quot; Expression )*
+                         &lt;SATISFIES&gt; Expression (&lt;END&gt;)?
+</pre></div></div>
+
+<p>Quantified expressions are used for expressing existential or universal predicates involving the elements of a collection.</p>
+<p>The following pair of examples illustrate the use of a quantified expression to test that every (or some) element in the set [1, 2, 3] of integers is less than three. The first example yields <tt>FALSE</tt> and second example yields <tt>TRUE</tt>.</p>
+<p>It is useful to note that if the set were instead the empty set, the first expression would yield <tt>TRUE</tt> (&#x201c;every&#x201d; value in an empty set satisfies the condition) while the second expression would yield <tt>FALSE</tt> (since there isn&#x2019;t &#x201c;some&#x201d; value, as there are no values in the set, that satisfies the condition).</p>
+<p>A quantified expression will return a <tt>NULL</tt> (or <tt>MISSING</tt>) if the first expression in it evaluates to <tt>NULL</tt> (or <tt>MISSING</tt>). A type error will be raised if the first expression in a quantified expression does not return a collection.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">EVERY x IN [ 1, 2, 3 ] SATISFIES x &lt; 3
+SOME x IN [ 1, 2, 3 ] SATISFIES x &lt; 3
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="Path_Expressions"></a><a name="Path_expressions" id="Path_expressions">Path Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">PathExpression  ::= PrimaryExpression ( Field | Index )*
+Field           ::= &quot;.&quot; Identifier
+Index           ::= &quot;[&quot; ( Expression | &quot;?&quot; ) &quot;]&quot;
+</pre></div></div>
+
+<p>Components of complex types in the data model are accessed via path expressions. Path access can be applied to the result of a SQL++ expression that yields an instance of  a complex type, for example, a object or array instance. For objects, path access is based on field names. For arrays, path access is based on (zero-based) array-style indexing. SQL++ also supports an &#x201c;I&#x2019;m feeling lucky&#x201d; style index accessor, [?], for selecting an arbitrary element from an array. Attempts to access non-existent fields or out-of-bound array elements produce the special value <tt>MISSING</tt>. Type errors will be raised for inappropriate use of a path expression, such as applying a field accessor to a numeric value.</p>
+<p>The following examples illustrate field access for a object, index-based element access for an array, and also a composition thereof.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">({&quot;name&quot;: &quot;MyABCs&quot;, &quot;array&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).array
+
+([&quot;a&quot;, &quot;b&quot;, &quot;c&quot;])[2]
+
+({&quot;name&quot;: &quot;MyABCs&quot;, &quot;array&quot;: [ &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}).array[2]
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="Primary_Expressions"></a><a name="Primary_expressions" id="Primary_expressions">Primary Expressions</a></h2>
+
+<div>
+<div>
+<pre class="source">PrimaryExpr ::= Literal
+              | VariableReference
+              | ParenthesizedExpression
+              | FunctionCallExpression
+              | Constructor
+</pre></div></div>
+
+<p>The most basic building block for any SQL++ expression is PrimaryExpression. This can be a simple literal (constant) value, a reference to a query variable that is in scope, a parenthesized expression, a function call, or a newly constructed instance of the data model (such as a newly constructed object, array, or multiset of data model instances).</p></div>
+<div class="section">
+<h2><a name="Literals" id="Literals">Literals</a></h2>
+
+<div>
+<div>
+<pre class="source">Literal        ::= StringLiteral
+                   | IntegerLiteral
+                   | FloatLiteral
+                   | DoubleLiteral
+                   | &lt;NULL&gt;
+                   | &lt;MISSING&gt;
+                   | &lt;TRUE&gt;
+                   | &lt;FALSE&gt;
+StringLiteral  ::= &quot;\&quot;&quot; (
+                             &lt;EscapeQuot&gt;
+                           | &lt;EscapeBslash&gt;
+                           | &lt;EscapeSlash&gt;
+                           | &lt;EscapeBspace&gt;
+                           | &lt;EscapeFormf&gt;
+                           | &lt;EscapeNl&gt;
+                           | &lt;EscapeCr&gt;
+                           | &lt;EscapeTab&gt;
+                           | ~[&quot;\&quot;&quot;,&quot;\\&quot;])*
+                    &quot;\&quot;&quot;
+                    | &quot;\'&quot;(
+                             &lt;EscapeApos&gt;
+                           | &lt;EscapeBslash&gt;
+                           | &lt;EscapeSlash&gt;
+                           | &lt;EscapeBspace&gt;
+                           | &lt;EscapeFormf&gt;
+                           | &lt;EscapeNl&gt;
+                           | &lt;EscapeCr&gt;
+                           | &lt;EscapeTab&gt;
+                           | ~[&quot;\'&quot;,&quot;\\&quot;])*
+                      &quot;\'&quot;
+&lt;ESCAPE_Apos&gt;  ::= &quot;\\\'&quot;
+&lt;ESCAPE_Quot&gt;  ::= &quot;\\\&quot;&quot;
+&lt;EscapeBslash&gt; ::= &quot;\\\\&quot;
+&lt;EscapeSlash&gt;  ::= &quot;\\/&quot;
+&lt;EscapeBspace&gt; ::= &quot;\\b&quot;
+&lt;EscapeFormf&gt;  ::= &quot;\\f&quot;
+&lt;EscapeNl&gt;     ::= &quot;\\n&quot;
+&lt;EscapeCr&gt;     ::= &quot;\\r&quot;
+&lt;EscapeTab&gt;    ::= &quot;\\t&quot;
+
+IntegerLiteral ::= &lt;DIGITS&gt;
+&lt;DIGITS&gt;       ::= [&quot;0&quot; - &quot;9&quot;]+
+FloatLiteral   ::= &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+                 | &lt;DIGITS&gt; ( &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; ) )?
+                 | &quot;.&quot; &lt;DIGITS&gt; ( &quot;f&quot; | &quot;F&quot; )
+DoubleLiteral  ::= &lt;DIGITS&gt; &quot;.&quot; &lt;DIGITS&gt;
+                   | &quot;.&quot; &lt;DIGITS&gt;
+</pre></div></div>
+
+<p>Literals (constants) in SQL++ can be strings, integers, floating point values, double values, boolean constants, or special constant values like <tt>NULL</tt> and <tt>MISSING</tt>. The <tt>NULL</tt> value is like a <tt>NULL</tt> in SQL; it is used to represent an unknown field value. The specialy value <tt>MISSING</tt> is only meaningful in the context of SQL++ field accesses; it occurs when the accessed field simply does not exist at all in a object being accessed.</p>
+<p>The following are some simple examples of SQL++ literals.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">'a string'
+&quot;test string&quot;
+42
+</pre></div></div>
+
+<p>Different from standard SQL, double quotes play the same role as single quotes and may be used for string literals in SQL++.</p></div></div></div>
+<div class="section">
+<h3><a name="Variable_References"></a><a name="Variable_references" id="Variable_references">Variable References</a></h3>
+
+<div>
+<div>
+<pre class="source">VariableReference     ::= &lt;IDENTIFIER&gt;|&lt;DelimitedIdentifier&gt;
+&lt;IDENTIFIER&gt;          ::= (&lt;LETTER&gt; | &quot;_&quot;) (&lt;LETTER&gt; | &lt;DIGIT&gt; | &quot;_&quot; | &quot;$&quot;)*
+&lt;LETTER&gt;              ::= [&quot;A&quot; - &quot;Z&quot;, &quot;a&quot; - &quot;z&quot;]
+DelimitedIdentifier   ::= &quot;`&quot; (&lt;EscapeQuot&gt;
+                                | &lt;EscapeBslash&gt;
+                                | &lt;EscapeSlash&gt;
+                                | &lt;EscapeBspace&gt;
+                                | &lt;EscapeFormf&gt;
+                                | &lt;EscapeNl&gt;
+                                | &lt;EscapeCr&gt;
+                                | &lt;EscapeTab&gt;
+                                | ~[&quot;`&quot;,&quot;\\&quot;])*
+                          &quot;`&quot;
+</pre></div></div>
+
+<p>A variable in SQL++ can be bound to any legal data model value. A variable reference refers to the value to which an in-scope variable is bound. (E.g., a variable binding may originate from one of the <tt>FROM</tt>, <tt>WITH</tt> or <tt>LET</tt> clauses of a <tt>SELECT</tt> statement or from an input parameter in the context of a function body.) Backticks, for example, `id`, are used for delimited identifiers. Delimiting is needed when a variable&#x2019;s desired name clashes with a SQL++ keyword or includes characters not allowed in regular identifiers. More information on exactly how variable references are resolved can be found in the appendix section on Variable Resolution.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">tweet
+id
+`SELECT`
+`my-function`
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Parenthesized_Expressions"></a><a name="Parenthesized_expressions" id="Parenthesized_expressions">Parenthesized Expressions</a></h3>
+
+<div>
+<div>
+<pre class="source">ParenthesizedExpression ::= &quot;(&quot; Expression &quot;)&quot; | Subquery
+</pre></div></div>
+
+<p>An expression can be parenthesized to control the precedence order or otherwise clarify a query. In SQL++, for composability, a subquery is also an parenthesized expression.</p>
+<p>The following expression evaluates to the value 2.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">( 1 + 1 )
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Function_Call_Expressions"></a><a name="Function_call_expressions" id="Function_call_expressions">Function Call Expressions</a></h3>
+
+<div>
+<div>
+<pre class="source">FunctionCallExpression ::= FunctionName &quot;(&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;)&quot;
+</pre></div></div>
+
+<p>Functions are included in SQL++, like most languages, as a way to package useful functionality or to componentize complicated or reusable SQL++ computations. A function call is a legal SQL++ query expression that represents the value resulting from the evaluation of its body expression with the given parameter bindings; the parameter value bindings can themselves be any SQL++ expressions.</p>
+<p>The following example is a (built-in) function call expression whose value is 8.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">length('a string')
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Constructors" id="Constructors">Constructors</a></h3>
+
+<div>
+<div>
+<pre class="source">Constructor              ::= ArrayConstructor | MultisetConstructor | ObjectConstructor
+ArrayConstructor         ::= &quot;[&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;]&quot;
+MultisetConstructor      ::= &quot;{{&quot; ( Expression ( &quot;,&quot; Expression )* )? &quot;}}&quot;
+ObjectConstructor        ::= &quot;{&quot; ( FieldBinding ( &quot;,&quot; FieldBinding )* )? &quot;}&quot;
+FieldBinding             ::= Expression &quot;:&quot; Expression
+</pre></div></div>
+
+<p>A major feature of SQL++ is its ability to construct new data model instances. This is accomplished using its constructors for each of the model&#x2019;s complex object structures, namely arrays, multisets, and objects. Arrays are like JSON arrays, while multisets have bag semantics. Objects are built from fields that are field-name/field-value pairs, again like JSON.</p>
+<p>The following examples illustrate how to construct a new array with 4 items and a new object with 2 fields respectively. Array elements can be homogeneous (as in the first example), which is the common case, or they may be heterogeneous (as in the second example). The data values and field name values used to construct arrays, multisets, and objects in constructors are all simply SQL++ expressions. Thus, the collection elements, field names, and field values used in constructors can be simple literals or they can come from query variable references or even arbitrarily complex SQL++ expressions (subqueries). Type errors will be raised if the field names in an object are not strings, and duplicate field errors will be raised if they are not distinct.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div>
+<div>
+<pre class="source">[ 'a', 'b', 'c', 'c' ]
+
+[ 42, &quot;forty-two!&quot;, { &quot;rank&quot; : &quot;Captain&quot;, &quot;name&quot;: &quot;America&quot; }, 3.14159 ]
+
+{
+  'project name': 'Hyracks',
+  'project members': [ 'vinayakb', 'dtabass', 'chenli', 'tsotras', 'tillw' ]
+}
+</pre></div></div>
+<!--
+ ! 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><a name="Queries" id="Queries">3. Queries</a></h1>
+<p>A SQL++ query can be any legal SQL++ expression or <tt>SELECT</tt> statement. A SQL++ query always ends with a semicolon.</p>
+
+<div>
+<div>
+<pre class="source">Query ::= (Expression | SelectStatement) &quot;;&quot;
+</pre></div></div>
+<!--
+ ! 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></div>
+<div class="section">
+<h2><a name="Declarations" id="Declarations">Declarations</a></h2>
+
+<div>
+<div>
+<pre class="source">DatabaseDeclaration ::= &quot;USE&quot; Identifier
+</pre></div></div>
+
+<p>At the uppermost level, the world of data is organized into data namespaces called <b>dataverses</b>. To set the default dataverse for a series of statements, the USE statement is provided in SQL++.</p>
+<p>As an example, the following statement sets the default dataverse to be &#x201c;TinySocial&#x201d;.</p>
+<div class="section">
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">USE TinySocial;
+</pre></div></div>
+<!--
+ ! 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.
+ !-->
+
+<p>When writing a complex SQL++ query, it can sometimes be helpful to define one or more auxilliary functions that each address a sub-piece of the overall query. The declare function statement supports the creation of such helper functions. In general, the function body (expression) can be any legal SQL++ query expression.</p>
+
+<div>
+<div>
+<pre class="source">FunctionDeclaration  ::= &quot;DECLARE&quot; &quot;FUNCTION&quot; Identifier ParameterList &quot;{&quot; Expression &quot;}&quot;
+ParameterList        ::= &quot;(&quot; ( &lt;VARIABLE&gt; ( &quot;,&quot; &lt;VARIABLE&gt; )* )? &quot;)&quot;
+</pre></div></div>
+
+<p>The following is a simple example of a temporary SQL++ function definition and its use.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">DECLARE FUNCTION friendInfo(userId) {
+    (SELECT u.id, u.name, len(u.friendIds) AS friendCount
+     FROM GleambookUsers u
+     WHERE u.id = userId)[0]
+ };
+
+SELECT VALUE friendInfo(2);
+</pre></div></div>
+
+<p>For our sample data set, this returns:</p>
+
+<div>
+<div>
+<pre class="source">[
+  { &quot;id&quot;: 2, &quot;name&quot;: &quot;IsbelDull&quot;, &quot;friendCount&quot;: 2 }
+]
+</pre></div></div>
+<!--
+ ! 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></div>
+<div class="section">
+<h2><a name="SELECT_Statements"></a><a name="SELECT_statements" id="SELECT_statements">SELECT Statements</a></h2>
+<p>The following shows the (rich) grammar for the <tt>SELECT</tt> statement in SQL++.</p>
+
+<div>
+<div>
+<pre class="source">SelectStatement    ::= ( WithClause )?
+                       SelectSetOperation (OrderbyClause )? ( LimitClause )?
+SelectSetOperation ::= SelectBlock (&lt;UNION&gt; &lt;ALL&gt; ( SelectBlock | Subquery ) )*
+Subquery           ::= &quot;(&quot; SelectStatement &quot;)&quot;
+
+SelectBlock        ::= SelectClause
+                       ( FromClause ( LetClause )?)?
+                       ( WhereClause )?
+                       ( GroupbyClause ( LetClause )? ( HavingClause )? )?
+                       |
+                       FromClause ( LetClause )?
+                       ( WhereClause )?
+                       ( GroupbyClause ( LetClause )? ( HavingClause )? )?
+                       SelectClause
+
+SelectClause       ::= &lt;SELECT&gt; ( &lt;ALL&gt; | &lt;DISTINCT&gt; )? ( SelectRegular | SelectValue )
+SelectRegular      ::= Projection ( &quot;,&quot; Projection )*
+SelectValue        ::= ( &lt;VALUE&gt; | &lt;ELEMENT&gt; | &lt;RAW&gt; ) Expression
+Projection         ::= ( Expression ( &lt;AS&gt; )? Identifier | &quot;*&quot; )
+
+FromClause         ::= &lt;FROM&gt; FromTerm ( &quot;,&quot; FromTerm )*
+FromTerm           ::= Expression (( &lt;AS&gt; )? Variable)?
+                       ( ( JoinType )? ( JoinClause | UnnestClause ) )*
+
+JoinClause         ::= &lt;JOIN&gt; Expression (( &lt;AS&gt; )? Variable)? &lt;ON&gt; Expression
+UnnestClause       ::= ( &lt;UNNEST&gt; ) Expression
+                       ( &lt;AS&gt; )? Variable ( &lt;AT&gt; Variable )?
+JoinType           ::= ( &lt;INNER&gt; | &lt;LEFT&gt; ( &lt;OUTER&gt; )? )
+
+WithClause         ::= &lt;WITH&gt; WithElement ( &quot;,&quot; WithElement )*
+LetClause          ::= (&lt;LET&gt; | &lt;LETTING&gt;) LetElement ( &quot;,&quot; LetElement )*
+LetElement         ::= Variable &quot;=&quot; Expression
+WithElement        ::= Variable &lt;AS&gt; Expression
+
+WhereClause        ::= &lt;WHERE&gt; Expression
+
+GroupbyClause      ::= &lt;GROUP&gt; &lt;BY&gt; Expression ( ( (&lt;AS&gt;)? Variable )?
+                       ( &quot;,&quot; Expression ( (&lt;AS&gt;)? Variable )? )* )
+                       ( &lt;GROUP&gt; &lt;AS&gt; Variable
+                         (&quot;(&quot; VariableReference &lt;AS&gt; Identifier
+                         (&quot;,&quot; VariableReference &lt;AS&gt; Identifier )* &quot;)&quot;)?
+                       )?
+HavingClause       ::= &lt;HAVING&gt; Expression
+
+OrderbyClause      ::= &lt;ORDER&gt; &lt;BY&gt; Expression ( &lt;ASC&gt; | &lt;DESC&gt; )?
+                       ( &quot;,&quot; Expression ( &lt;ASC&gt; | &lt;DESC&gt; )? )*
+LimitClause        ::= &lt;LIMIT&gt; Expression ( &lt;OFFSET&gt; Expression )?
+</pre></div></div>
+
+<p>In this section, we will make use of two stored collections of objects (datasets), <tt>GleambookUsers</tt> and <tt>GleambookMessages</tt>, in a series of running examples to explain <tt>SELECT</tt> queries. The contents of the example collections are as follows:</p>
+<p><tt>GleambookUsers</tt> collection (or, dataset):</p>
+
+<div>
+<div>
+<pre class="source">[ {
+  &quot;id&quot;:1,
+  &quot;alias&quot;:&quot;Margarita&quot;,
+  &quot;name&quot;:&quot;MargaritaStoddard&quot;,
+  &quot;nickname&quot;:&quot;Mags&quot;,
+  &quot;userSince&quot;:&quot;2012-08-20T10:10:00&quot;,
+  &quot;friendIds&quot;:[2,3,6,10],
+  &quot;employment&quot;:[{
+                  &quot;organizationName&quot;:&quot;Codetechno&quot;,
+                  &quot;start-date&quot;:&quot;2006-08-06&quot;
+                },
+                {
+                  &quot;organizationName&quot;:&quot;geomedia&quot;,
+                  &quot;start-date&quot;:&quot;2010-06-17&quot;,
+                  &quot;end-date&quot;:&quot;2010-01-26&quot;
+                }],
+  &quot;gender&quot;:&quot;F&quot;
+},
+{
+  &quot;id&quot;:2,
+  &quot;alias&quot;:&quot;Isbel&quot;,
+  &quot;name&quot;:&quot;IsbelDull&quot;,
+  &quot;nickname&quot;:&quot;Izzy&quot;,
+  &quot;userSince&quot;:&quot;2011-01-22T10:10:00&quot;,
+  &quot;friendIds&quot;:[1,4],
+  &quot;employment&quot;:[{
+                  &quot;organizationName&quot;:&quot;Hexviafind&quot;,
+                  &quot;startDate&quot;:&quot;2010-04-27&quot;
+               }]
+},
+{
+  &quot;id&quot;:3,
+  &quot;alias&quot;:&quot;Emory&quot;,
+  &quot;name&quot;:&quot;EmoryUnk&quot;,
+  &quot;userSince&quot;:&quot;2012-07-10T10:10:00&quot;,
+  &quot;friendIds&quot;:[1,5,8,9],
+  &quot;employment&quot;:[{
+                  &quot;organizationName&quot;:&quot;geomedia&quot;,
+                  &quot;startDate&quot;:&quot;2010-06-17&quot;,
+                  &quot;endDate&quot;:&quot;2010-01-26&quot;
+               }]
+} ]
+</pre></div></div>
+
+<p><tt>GleambookMessages</tt> collection (or, dataset):</p>
+
+<div>
+<div>
+<pre class="source">[ {
+  &quot;messageId&quot;:2,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:4,
+  &quot;senderLocation&quot;:[41.66,80.87],
+  &quot;message&quot;:&quot; dislike x-phone its touch-screen is horrible&quot;
+},
+{
+  &quot;messageId&quot;:3,
+  &quot;authorId&quot;:2,
+  &quot;inResponseTo&quot;:4,
+  &quot;senderLocation&quot;:[48.09,81.01],
+  &quot;message&quot;:&quot; like product-y the plan is amazing&quot;
+},
+{
+  &quot;messageId&quot;:4,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:2,
+  &quot;senderLocation&quot;:[37.73,97.04],
+  &quot;message&quot;:&quot; can't stand acast the network is horrible:(&quot;
+},
+{
+  &quot;messageId&quot;:6,
+  &quot;authorId&quot;:2,
+  &quot;inResponseTo&quot;:1,
+  &quot;senderLocation&quot;:[31.5,75.56],
+  &quot;message&quot;:&quot; like product-z its platform is mind-blowing&quot;
+}
+{
+  &quot;messageId&quot;:8,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:11,
+  &quot;senderLocation&quot;:[40.33,80.87],
+  &quot;message&quot;:&quot; like ccast the 3G is awesome:)&quot;
+},
+{
+  &quot;messageId&quot;:10,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:12,
+  &quot;senderLocation&quot;:[42.5,70.01],
+  &quot;message&quot;:&quot; can't stand product-w the touch-screen is terrible&quot;
+},
+{
+  &quot;messageId&quot;:11,
+  &quot;authorId&quot;:1,
+  &quot;inResponseTo&quot;:1,
+  &quot;senderLocation&quot;:[38.97,77.49],
+  &quot;message&quot;:&quot; can't stand acast its plan is terrible&quot;
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="SELECT_Clause"></a><a name="Select_clauses" id="Select_clauses">SELECT Clause</a></h2>
+<p>The SQL++ <tt>SELECT</tt> clause always returns a collection value as its result (even if the result is empty or a singleton).</p>
+<div class="section">
+<h3><a name="Select_Element.2FValue.2FRaw"></a><a name="Select_element" id="Select_element">Select Element/Value/Raw</a></h3>
+<p>The <tt>SELECT VALUE</tt> clause in SQL++ returns an array or multiset that contains the results of evaluating the <tt>VALUE</tt> expression, with one evaluation being performed per &#x201c;binding tuple&#x201d; (i.e., per <tt>FROM</tt> clause item) satisfying the statement&#x2019;s selection criteria. For historical reasons SQL++ also allows the keywords <tt>ELEMENT</tt> or <tt>RAW</tt> to be used in place of <tt>VALUE</tt> (not recommended).</p>
+<p>If there is no FROM clause, the expression after <tt>VALUE</tt> is evaluated once with no binding tuples (except those inherited from an outer environment).</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT VALUE 1;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[
+  1
+]
+</pre></div></div>
+
+<p>The following example shows a query that selects one user from the GleambookUsers collection.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT VALUE user
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[{
+    &quot;userSince&quot;: &quot;2012-08-20T10:10:00.000Z&quot;,
+    &quot;friendIds&quot;: [
+        2,
+        3,
+        6,
+        10
+    ],
+    &quot;gender&quot;: &quot;F&quot;,
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;nickname&quot;: &quot;Mags&quot;,
+    &quot;alias&quot;: &quot;Margarita&quot;,
+    &quot;id&quot;: 1,
+    &quot;employment&quot;: [
+        {
+            &quot;organizationName&quot;: &quot;Codetechno&quot;,
+            &quot;start-date&quot;: &quot;2006-08-06&quot;
+        },
+        {
+            &quot;end-date&quot;: &quot;2010-01-26&quot;,
+            &quot;organizationName&quot;: &quot;geomedia&quot;,
+            &quot;start-date&quot;: &quot;2010-06-17&quot;
+        }
+    ]
+} ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="SQL-style_SELECT"></a><a name="SQL_select" id="SQL_select">SQL-style SELECT</a></h3>
+<p>In SQL++, the traditional SQL-style <tt>SELECT</tt> syntax is also supported. This syntax can also be reformulated in a <tt>SELECT VALUE</tt> based manner in SQL++. (E.g., <tt>SELECT expA AS fldA, expB AS fldB</tt> is syntactic sugar for <tt>SELECT VALUE { 'fldA': expA, 'fldB': expB }</tt>.) Unlike in SQL, the result of an SQL++ query does not preserve the order of expressions in the <tt>SELECT</tt> clause.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT user.alias user_alias, user.name user_name
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;user_name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;user_alias&quot;: &quot;Margarita&quot;
+} ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="SELECT_.2A"></a><a name="Select_star" id="Select_star">SELECT *</a></h3>
+<p>In SQL++, <tt>SELECT *</tt> returns a object with a nested field for each input tuple. Each field has as its field name the name of a binding variable generated by either the <tt>FROM</tt> clause or <tt>GROUP BY</tt> clause in the current enclosing <tt>SELECT</tt> statement, and its field value is the value of that binding variable.</p>
+<p>Note that the result of <tt>SELECT *</tt> is different from the result of query that selects all the fields of an object.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT *
+FROM GleambookUsers user;
+</pre></div></div>
+
+<p>Since <tt>user</tt> is the only binding variable generated in the <tt>FROM</tt> clause, this query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;user&quot;: {
+        &quot;userSince&quot;: &quot;2012-08-20T10:10:00.000Z&quot;,
+        &quot;friendIds&quot;: [
+            2,
+            3,
+            6,
+            10
+        ],
+        &quot;gender&quot;: &quot;F&quot;,
+        &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+        &quot;nickname&quot;: &quot;Mags&quot;,
+        &quot;alias&quot;: &quot;Margarita&quot;,
+        &quot;id&quot;: 1,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Codetechno&quot;,
+                &quot;start-date&quot;: &quot;2006-08-06&quot;
+            },
+            {
+                &quot;end-date&quot;: &quot;2010-01-26&quot;,
+                &quot;organizationName&quot;: &quot;geomedia&quot;,
+                &quot;start-date&quot;: &quot;2010-06-17&quot;
+            }
+        ]
+    }
+}, {
+    &quot;user&quot;: {
+        &quot;userSince&quot;: &quot;2011-01-22T10:10:00.000Z&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            4
+        ],
+        &quot;name&quot;: &quot;IsbelDull&quot;,
+        &quot;nickname&quot;: &quot;Izzy&quot;,
+        &quot;alias&quot;: &quot;Isbel&quot;,
+        &quot;id&quot;: 2,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Hexviafind&quot;,
+                &quot;startDate&quot;: &quot;2010-04-27&quot;
+            }
+        ]
+    }
+}, {
+    &quot;user&quot;: {
+        &quot;userSince&quot;: &quot;2012-07-10T10:10:00.000Z&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            5,
+            8,
+            9
+        ],
+        &quot;name&quot;: &quot;EmoryUnk&quot;,
+        &quot;alias&quot;: &quot;Emory&quot;,
+        &quot;id&quot;: 3,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;geomedia&quot;,
+                &quot;endDate&quot;: &quot;2010-01-26&quot;,
+                &quot;startDate&quot;: &quot;2010-06-17&quot;
+            }
+        ]
+    }
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT *
+FROM GleambookUsers u, GleambookMessages m
+WHERE m.authorId = u.id and u.id = 2;
+</pre></div></div>
+
+<p>This query does an inner join that we will discuss in <a href="#Multiple_from_terms">multiple from terms</a>. Since both <tt>u</tt> and <tt>m</tt> are binding variables generated in the <tt>FROM</tt> clause, this query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;u&quot;: {
+        &quot;userSince&quot;: &quot;2011-01-22T10:10:00&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            4
+        ],
+        &quot;name&quot;: &quot;IsbelDull&quot;,
+        &quot;nickname&quot;: &quot;Izzy&quot;,
+        &quot;alias&quot;: &quot;Isbel&quot;,
+        &quot;id&quot;: 2,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Hexviafind&quot;,
+                &quot;startDate&quot;: &quot;2010-04-27&quot;
+            }
+        ]
+    },
+    &quot;m&quot;: {
+        &quot;senderLocation&quot;: [
+            31.5,
+            75.56
+        ],
+        &quot;inResponseTo&quot;: 1,
+        &quot;messageId&quot;: 6,
+        &quot;authorId&quot;: 2,
+        &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+    }
+}, {
+    &quot;u&quot;: {
+        &quot;userSince&quot;: &quot;2011-01-22T10:10:00&quot;,
+        &quot;friendIds&quot;: [
+            1,
+            4
+        ],
+        &quot;name&quot;: &quot;IsbelDull&quot;,
+        &quot;nickname&quot;: &quot;Izzy&quot;,
+        &quot;alias&quot;: &quot;Isbel&quot;,
+        &quot;id&quot;: 2,
+        &quot;employment&quot;: [
+            {
+                &quot;organizationName&quot;: &quot;Hexviafind&quot;,
+                &quot;startDate&quot;: &quot;2010-04-27&quot;
+            }
+        ]
+    },
+    &quot;m&quot;: {
+        &quot;senderLocation&quot;: [
+            48.09,
+            81.01
+        ],
+        &quot;inResponseTo&quot;: 4,
+        &quot;messageId&quot;: 3,
+        &quot;authorId&quot;: 2,
+        &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+    }
+} ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="SELECT_DISTINCT"></a><a name="Select_distinct" id="Select_distinct">SELECT DISTINCT</a></h3>
+<p>SQL++&#x2019;s <tt>DISTINCT</tt> keyword is used to eliminate duplicate items in results. The following example shows how it works.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT DISTINCT * FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;foo&quot;: 1
+}, {
+    &quot;foo&quot;: 2
+}, {
+    &quot;foo&quot;: 3
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT DISTINCT VALUE foo FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+
+<p>This version of the query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ 1
+, 2
+, 3
+ ]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Unnamed_Projections"></a><a name="Unnamed_projections" id="Unnamed_projections">Unnamed Projections</a></h3>
+<p>Similar to standard SQL, SQL++ supports unnamed projections (a.k.a, unnamed <tt>SELECT</tt> clause items), for which names are generated. Name generation has three cases:</p>
+<ul>
+
+<li>If a projection expression is a variable reference expression, its generated name is the name of the variable.</li>
+<li>If a projection expression is a field access expression, its generated name is the last identifier in the expression.</li>
+<li>For all other cases, the query processor will generate a unique name.</li>
+</ul>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT substr(user.name, 10), user.alias
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+
+<p>This query outputs:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;alias&quot;: &quot;Margarita&quot;,
+    &quot;$1&quot;: &quot;Stoddard&quot;
+} ]
+</pre></div></div>
+
+<p>In the result, <tt>$1</tt> is the generated name for <tt>substr(user.name, 1)</tt>, while <tt>alias</tt> is the generated name for <tt>user.alias</tt>.</p></div></div></div>
+<div class="section">
+<h3><a name="Abbreviated_Field_Access_Expressions"></a><a name="Abbreviated_field_access_expressions" id="Abbreviated_field_access_expressions">Abbreviated Field Access Expressions</a></h3>
+<p>As in standard SQL, SQL++ field access expressions can be abbreviated (not recommended!) when there is no ambiguity. In the next example, the variable <tt>user</tt> is the only possible variable reference for fields <tt>id</tt>, <tt>name</tt> and <tt>alias</tt> and thus could be omitted in the query. More information on abbbreviated field access can be found in the appendix section on Variable Resolution.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT substr(name, 10) AS lname, alias
+FROM GleambookUsers user
+WHERE id = 1;
+</pre></div></div>
+
+<p>Outputs:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;lname&quot;: &quot;Stoddard&quot;,
+    &quot;alias&quot;: &quot;Margarita&quot;
+} ]
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="UNNEST_Clause"></a><a name="Unnest_clauses" id="Unnest_clauses">UNNEST Clause</a></h2>
+<p>For each of its input tuples, the <tt>UNNEST</tt> clause flattens a collection-valued expression into individual items, producing multiple tuples, each of which is one of the expression&#x2019;s original input tuples augmented with a flattened item from its collection.</p>
+<div class="section">
+<h3><a name="Inner_UNNEST"></a><a name="Inner_unnests" id="Inner_unnests">Inner UNNEST</a></h3>
+<p>The following example is a query that retrieves the names of the organizations that a selected user has worked for. It uses the <tt>UNNEST</tt> clause to unnest the nested collection <tt>employment</tt> in the user&#x2019;s object.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.id AS userId, e.organizationName AS orgName
+FROM GleambookUsers u
+UNNEST u.employment e
+WHERE u.id = 1;
+</pre></div></div>
+
+<p>This query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;orgName&quot;: &quot;Codetechno&quot;,
+    &quot;userId&quot;: 1
+}, {
+    &quot;orgName&quot;: &quot;geomedia&quot;,
+    &quot;userId&quot;: 1
+} ]
+</pre></div></div>
+
+<p>Note that <tt>UNNEST</tt> has SQL&#x2019;s inner join semantics &#x2014; that is, if a user has no employment history, no tuple corresponding to that user will be emitted in the result.</p></div></div></div>
+<div class="section">
+<h3><a name="Left_Outer_UNNEST"></a><a name="Left_outer_unnests" id="Left_outer_unnests">Left Outer UNNEST</a></h3>
+<p>As an alternative, the <tt>LEFT OUTER UNNEST</tt> clause offers SQL&#x2019;s left outer join semantics. For example, no collection-valued field named <tt>hobbies</tt> exists in the object for the user whose id is 1, but the following query&#x2019;s result still includes user 1.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.id AS userId, h.hobbyName AS hobby
+FROM GleambookUsers u
+LEFT OUTER UNNEST u.hobbies h
+WHERE u.id = 1;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;userId&quot;: 1
+} ]
+</pre></div></div>
+
+<p>Note that if <tt>u.hobbies</tt> is an empty collection or leads to a <tt>MISSING</tt> (as above) or <tt>NULL</tt> value for a given input tuple, there is no corresponding binding value for variable <tt>h</tt> for an input tuple. A <tt>MISSING</tt> value will be generated for <tt>h</tt> so that the input tuple can still be propagated.</p></div></div></div>
+<div class="section">
+<h3><a name="Expressing_Joins_Using_UNNEST"></a><a name="Expressing_joins_using_unnests" id="Expressing_joins_using_unnests">Expressing Joins Using UNNEST</a></h3>
+<p>The SQL++ <tt>UNNEST</tt> clause is similar to SQL&#x2019;s <tt>JOIN</tt> clause except that it allows its right argument to be correlated to its left argument, as in the examples above &#x2014; i.e., think &#x201c;correlated cross-product&#x201d;. The next example shows this via a query that joins two data sets, GleambookUsers and GleambookMessages, returning user/message pairs. The results contain one object per pair, with result objects containing the user&#x2019;s name and an entire message. The query can be thought of as saying &#x201c;for each Gleambook user, unnest the <tt>GleambookMessages</tt> collection and filter the output with the condition <tt>message.authorId = user.id</tt>&#x201d;.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u
+UNNEST GleambookMessages m
+WHERE m.authorId = u.id;
+</pre></div></div>
+
+<p>This returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+} ]
+</pre></div></div>
+
+<p>Similarly, the above query can also be expressed as the <tt>UNNEST</tt>ing of a correlated SQL++ subquery:</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u
+UNNEST (
+    SELECT VALUE msg
+    FROM GleambookMessages msg
+    WHERE msg.authorId = u.id
+) AS m;
+</pre></div></div>
+</div></div></div></div>
+<div class="section">
+<h2><a name="FROM_clauses"></a><a name="From_clauses" id="From_clauses">FROM clauses</a></h2>
+<p>A <tt>FROM</tt> clause is used for enumerating (i.e., conceptually iterating over) the contents of collections, as in SQL.</p>
+<div class="section">
+<h3><a name="Binding_expressions" id="Binding_expressions">Binding expressions</a></h3>
+<p>In SQL++, in addition to stored collections, a <tt>FROM</tt> clause can iterate over any intermediate collection returned by a valid SQL++ expression. In the tuple stream generated by a <tt>FROM</tt> clause, the ordering of the input tuples are not guaranteed to be preserved.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT VALUE foo
+FROM [1, 2, 2, 3] AS foo
+WHERE foo &gt; 2;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[
+  3
+]
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Multiple_FROM_Terms"></a><a name="Multiple_from_terms" id="Multiple_from_terms">Multiple FROM Terms</a></h3>
+<p>SQL++ permits correlations among <tt>FROM</tt> terms. Specifically, a <tt>FROM</tt> binding expression can refer to variables defined to its left in the given <tt>FROM</tt> clause. Thus, the first unnesting example above could also be expressed as follows:</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.id AS userId, e.organizationName AS orgName
+FROM GleambookUsers u, u.employment e
+WHERE u.id = 1;
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Expressing_Joins_Using_FROM_Terms"></a><a name="Expressing_joins_using_from_terms" id="Expressing_joins_using_from_terms">Expressing Joins Using FROM Terms</a></h3>
+<p>Similarly, the join intentions of the other <tt>UNNEST</tt>-based join examples above could be expressed as:</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u, GleambookMessages m
+WHERE m.authorId = u.id;
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u,
+  (
+    SELECT VALUE msg
+    FROM GleambookMessages msg
+    WHERE msg.authorId = u.id
+  ) AS m;
+</pre></div></div>
+
+<p>Note that the first alternative is one of the SQL-92 approaches to expressing a join.</p></div></div></div>
+<div class="section">
+<h3><a name="Implicit_Binding_Variables"></a><a name="Implicit_binding_variables" id="Implicit_binding_variables">Implicit Binding Variables</a></h3>
+<p>Similar to standard SQL, SQL++ supports implicit <tt>FROM</tt> binding variables (i.e., aliases), for which a binding variable is generated. SQL++ variable generation falls into three cases:</p>
+<ul>
+
+<li>If the binding expression is a variable reference expression, the generated variable&#x2019;s name will be the name of the referenced variable itself.</li>
+<li>If the binding expression is a field access expression (or a fully qualified name for a dataset), the generated variable&#x2019;s name will be the last identifier (or the dataset name) in the expression.</li>
+<li>For all other cases, a compilation error will be raised.</li>
+</ul>
+<p>The next two examples show queries that do not provide binding variables in their <tt>FROM</tt> clauses.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers, GleambookMessages
+WHERE GleambookMessages.authorId = GleambookUsers.id;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+} ]
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers,
+  (
+    SELECT VALUE GleambookMessages
+    FROM GleambookMessages
+    WHERE GleambookMessages.authorId = GleambookUsers.id
+  );
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">Error: &quot;Syntax error: Need an alias for the enclosed expression:\n(select element GleambookMessages\n    from GleambookMessages as GleambookMessages\n    where (GleambookMessages.authorId = GleambookUsers.id)\n )&quot;,
+    &quot;query_from_user&quot;: &quot;use TinySocial;\n\nSELECT GleambookUsers.name, GleambookMessages.message\n    FROM GleambookUsers,\n      (\n        SELECT VALUE GleambookMessages\n        FROM GleambookMessages\n        WHERE GleambookMessages.authorId = GleambookUsers.id\n      );&quot;
+</pre></div></div>
+
+<p>More information on implicit binding variables can be found in the appendix section on Variable Resolution.</p></div></div></div></div>
+<div class="section">
+<h2><a name="JOIN_Clauses"></a><a name="Join_clauses" id="Join_clauses">JOIN Clauses</a></h2>
+<p>The join clause in SQL++ supports both inner joins and left outer joins from standard SQL.</p>
+<div class="section">
+<h3><a name="Inner_joins" id="Inner_joins">Inner joins</a></h3>
+<p>Using a <tt>JOIN</tt> clause, the inner join intent from the preceeding examples can also be expressed as follows:</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u JOIN GleambookMessages m ON m.authorId = u.id;
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h3><a name="Left_Outer_Joins"></a><a name="Left_outer_joins" id="Left_outer_joins">Left Outer Joins</a></h3>
+<p>SQL++ supports SQL&#x2019;s notion of left outer join. The following query is an example:</p>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u LEFT OUTER JOIN GleambookMessages m ON m.authorId = u.id;
+</pre></div></div>
+
+<p>Returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-y the plan is amazing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+}, {
+    &quot;uname&quot;: &quot;EmoryUnk&quot;
+} ]
+</pre></div></div>
+
+<p>For non-matching left-side tuples, SQL++ produces <tt>MISSING</tt> values for the right-side binding variables; that is why the last object in the above result doesn&#x2019;t have a <tt>message</tt> field. Note that this is slightly different from standard SQL, which instead would fill in <tt>NULL</tt> values for the right-side fields. The reason for this difference is that, for non-matches in its join results, SQL++ views fields from the right-side as being &#x201c;not there&#x201d; (a.k.a. <tt>MISSING</tt>) instead of as being &#x201c;there but unknown&#x201d; (i.e., <tt>NULL</tt>).</p>
+<p>The left-outer join query can also be expressed using <tt>LEFT OUTER UNNEST</tt>:</p>
+
+<div>
+<div>
+<pre class="source">SELECT u.name AS uname, m.message AS message
+FROM GleambookUsers u
+LEFT OUTER UNNEST (
+    SELECT VALUE message
+    FROM GleambookMessages message
+    WHERE message.authorId = u.id
+  ) m;
+</pre></div></div>
+
+<p>In general, in SQL++, SQL-style join queries can also be expressed by <tt>UNNEST</tt> clauses and left outer join queries can be expressed by <tt>LEFT OUTER UNNESTs</tt>.</p></div></div>
+<div class="section">
+<h2><a name="GROUP_BY_Clauses"></a><a name="Group_By_clauses" id="Group_By_clauses">GROUP BY Clauses</a></h2>
+<p>The SQL++ <tt>GROUP BY</tt> clause generalizes standard SQL&#x2019;s grouping and aggregation semantics, but it also retains backward compatibility with the standard (relational) SQL <tt>GROUP BY</tt> and aggregation features.</p>
+<div class="section">
+<h3><a name="Group_variables" id="Group_variables">Group variables</a></h3>
+<p>In a <tt>GROUP BY</tt> clause, in addition to the binding variable(s) defined for the grouping key(s), SQL++ allows a user to define a <i>group variable</i> by using the clause&#x2019;s <tt>GROUP AS</tt> extension to denote the resulting group. After grouping, then, the query&#x2019;s in-scope variables include the grouping key&#x2019;s binding variables as well as this group variable which will be bound to one collection value for each group. This per-group collection (i.e., multiset) value will be a set of nested objects in which each field of the object is the result of a renamed variable defined in parentheses following the group variable&#x2019;s name. The <tt>GROUP AS</tt> syntax is as follows:</p>
+
+<div>
+<div>
+<pre class="source">&lt;GROUP&gt; &lt;AS&gt; Variable (&quot;(&quot; VariableReference &lt;AS&gt; Identifier (&quot;,&quot; VariableReference &lt;AS&gt; Identifier )* &quot;)&quot;)?
+</pre></div></div>
+
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div>
+<div>
+<pre class="source">SELECT *
+FROM GleambookMessages message
+GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+</pre></div></div>
+
+<p>This first example query returns:</p>
+
+<div>
+<div>
+<pre class="source">[ {
+    &quot;msgs&quot;: [
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    38.97,
+                    77.49
+                ],
+                &quot;inResponseTo&quot;: 1,
+                &quot;messageId&quot;: 11,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; can't stand acast its plan is terrible&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    41.66,
+                    80.87
+                ],
+                &quot;inResponseTo&quot;: 4,
+                &quot;messageId&quot;: 2,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; dislike x-phone its touch-screen is horrible&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    37.73,
+                    97.04
+                ],
+                &quot;inResponseTo&quot;: 2,
+                &quot;messageId&quot;: 4,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; can't stand acast the network is horrible:(&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    40.33,
+                    80.87
+                ],
+                &quot;inResponseTo&quot;: 11,
+                &quot;messageId&quot;: 8,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; like ccast the 3G is awesome:)&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    42.5,
+                    70.01
+                ],
+                &quot;inResponseTo&quot;: 12,
+                &quot;messageId&quot;: 10,
+                &quot;authorId&quot;: 1,
+                &quot;message&quot;: &quot; can't stand product-w the touch-screen is terrible&quot;
+            }
+        }
+    ],
+    &quot;uid&quot;: 1
+}, {
+    &quot;msgs&quot;: [
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    31.5,
+                    75.56
+                ],
+                &quot;inResponseTo&quot;: 1,
+                &quot;messageId&quot;: 6,
+                &quot;authorId&quot;: 2,
+                &quot;message&quot;: &quot; like product-z its platform is mind-blowing&quot;
+            }
+        },
+        {
+            &quot;msg&quot;: {
+                &quot;senderLocation&quot;: [
+                    48.09,
+   

<TRUNCATED>

[13/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/feeds/tutorial.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/feeds/tutorial.html b/content/docs/0.9.4/feeds/tutorial.html
deleted file mode 100644
index d870a25..0000000
--- a/content/docs/0.9.4/feeds/tutorial.html
+++ /dev/null
@@ -1,450 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/feeds/tutorial.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Support for Data Ingestion in AsterixDB</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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>Support for Data Ingestion in AsterixDB</h1>
-<div class="section">
-<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
-<ul>
-
-<li><a href="#Introduction">Introduction</a></li>
-<li><a href="#FeedAdapters">Feed Adapters</a></li>
-</ul><!-- * [Feed Policies](#FeedPolicies) -->
-</div>
-<div class="section">
-<h2><a name="Introduction">Introduction</a></h2>
-<p>In this document, we describe the support for data ingestion in AsterixDB. Data feeds are a new mechanism for having continuous data arrive into a BDMS from external sources and incrementally populate a persisted dataset and associated indexes. We add a new BDMS architectural component, called a data feed, that makes a Big Data system the caretaker for functionality that used to live outside, and we show how it improves users&#x2019; lives and system performance.</p></div>
-<div class="section">
-<h2><a name="Feed_Adapters"></a><a name="FeedAdapters">Feed Adapters</a></h2>
-<p>The functionality of establishing a connection with a data source and receiving, parsing and translating its data into ADM objects (for storage inside AsterixDB) is contained in a feed adapter. A feed adapter is an implementation of an interface and its details are specific to a given data source. An adapter may optionally be given parameters to configure its runtime behavior. Depending upon the data transfer protocol/APIs offered by the data source, a feed adapter may operate in a push or a pull mode. Push mode involves just one initial request by the adapter to the data source for setting up the connection. Once a connection is authorized, the data source &#x201c;pushes&#x201d; data to the adapter without any subsequent requests by the adapter. In contrast, when operating in a pull mode, the adapter makes a separate request each time to receive data. AsterixDB currently provides built-in adapters for several popular data sources such as Twitter and RSS feeds. AsterixDB addition
 ally provides a generic socket-based adapter that can be used to ingest data that is directed at a prescribed socket.</p>
-<p>In this tutorial, we shall describe building two example data ingestion pipelines that cover the popular scenarios of ingesting data from (a) Twitter (b) RSS  (c) Socket Feed source.</p>
-<div class="section">
-<div class="section">
-<h4><a name="Ingesting_Twitter_Stream"></a>Ingesting Twitter Stream</h4>
-<p>We shall use the built-in push-based Twitter adapter. As a pre-requisite, we must define a Tweet using the AsterixDB Data Model (ADM) and the AsterixDB Query Language (AQL). Given below are the type definitions in AQL that create a Tweet datatype which is representative of a real tweet as obtained from Twitter.</p>
-
-<div>
-<div>
-<pre class="source">    create dataverse feeds;
-    use dataverse feeds;
-
-    create type TwitterUser as closed {
-        screen_name: string,
-        lang: string,
-        friends_count: int32,
-        statuses_count: int32
-    };
-
-    create type Tweet as open {
-        id: int64,
-        user: TwitterUser
-    }
-
-    create dataset Tweets (Tweet)
-    primary key id;
-</pre></div></div>
-
-<p>We also create a dataset that we shall use to persist the tweets in AsterixDB. Next we make use of the <tt>create feed</tt> AQL statement to define our example data feed.</p>
-<div class="section">
-<h5><a name="Using_the_.E2.80.9Cpush_twitter.E2.80.9D_feed_adapter"></a>Using the &#x201c;push_twitter&#x201d; feed adapter</h5>
-<p>The &#x201c;push_twitter&#x201d; adapter requires setting up an application account with Twitter. To retrieve tweets, Twitter requires registering an application. Registration involves providing a name and a brief description for the application. Each application has associated OAuth authentication credentials that include OAuth keys and tokens. Accessing the Twitter API requires providing the following. 1. Consumer Key (API Key) 2. Consumer Secret (API Secret) 3. Access Token 4. Access Token Secret</p>
-<p>The &#x201c;push_twitter&#x201d; adapter takes as configuration the above mentioned parameters. End users are required to obtain the above authentication credentials prior to using the &#x201c;push_twitter&#x201d; adapter. For further information on obtaining OAuth keys and tokens and registering an application with Twitter, please visit <a class="externalLink" href="http://apps.twitter.com">http://apps.twitter.com</a></p>
-<p>Given below is an example AQL statement that creates a feed called &#x201c;TwitterFeed&#x201d; by using the &#x201c;push_twitter&#x201d; adapter.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
-    ((&quot;type-name&quot;=&quot;Tweet&quot;),
-     (&quot;format&quot;=&quot;twitter-status&quot;),
-     (&quot;consumer.key&quot;=&quot;************&quot;),
-     (&quot;consumer.secret&quot;=&quot;**************&quot;),
-     (&quot;access.token&quot;=&quot;**********&quot;),
-     (&quot;access.token.secret&quot;=&quot;*************&quot;));
-</pre></div></div>
-
-<p>It is required that the above authentication parameters are provided valid. Note that the <tt>create feed</tt> statement does not initiate the flow of data from Twitter into the AsterixDB instance. Instead, the <tt>create feed</tt> statement only results in registering the feed with the instance. The flow of data along a feed is initiated when it is connected to a target dataset using the connect feed statement and activated using the start feed statement.</p>
-<p>The Twitter adapter also supports several Twitter streaming APIs as follow:</p>
-<ol style="list-style-type: decimal">
-
-<li>Track filter (&#x201c;keywords&#x201d;=&#x201c;AsterixDB, Apache&#x201d;)</li>
-<li>Locations filter (&#x201c;locations&#x201d;=&#x201c;-29.7, 79.2, 36.7, 72.0; -124.848974,-66.885444, 24.396308, 49.384358&#x201d;)</li>
-<li>Language filter (&#x201c;language&#x201d;=&#x201c;en&#x201d;)</li>
-<li>Filter level (&#x201c;filter-level&#x201d;=&#x201c;low&#x201d;)</li>
-</ol>
-<p>An example of Twitter adapter tracking tweets with keyword &#x201c;news&#x201d; can be described using following ddl:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
-    ((&quot;type-name&quot;=&quot;Tweet&quot;),
-     (&quot;format&quot;=&quot;twitter-status&quot;),
-     (&quot;consumer.key&quot;=&quot;************&quot;),
-     (&quot;consumer.secret&quot;=&quot;**************&quot;),
-     (&quot;access.token&quot;=&quot;**********&quot;),
-     (&quot;access.token.secret&quot;=&quot;*************&quot;),
-     (&quot;keywords&quot;=&quot;news&quot;));
-</pre></div></div>
-
-<p>For more details about these APIs, please visit <a class="externalLink" href="https://dev.twitter.com/streaming/overview/request-parameters">https://dev.twitter.com/streaming/overview/request-parameters</a></p></div></div>
-<div class="section">
-<h4><a name="Lifecycle_of_a_Feed"></a>Lifecycle of a Feed</h4>
-<p>A feed is a logical artifact that is brought to life (i.e., its data flow is initiated) only when it is activated using the <tt>start feed</tt> statement. Before we active a feed, we need to designate the dataset where the data to be persisted using <tt>connect feed</tt> statement. Subsequent to a <tt>connect feed</tt> statement, the feed is said to be in the connected state. After that, <tt>start feed</tt> statement will activate the feed, and start the dataflow from feed to its connected dataset. Multiple feeds can simultaneously be connected to a dataset such that the contents of the dataset represent the union of the connected feeds. Also one feed can be simultaneously connected to multiple target datasets.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    connect feed TwitterFeed to dataset Tweets;
-
-    start feed TwitterFeed;
-</pre></div></div>
-
-<p>The <tt>connect feed</tt> statement above directs AsterixDB to persist the data from <tt>TwitterFeed</tt> feed into the <tt>Tweets</tt> dataset. The <tt>start feed</tt> statement will activate the feed and start the dataflow. If it is required (by the high-level application) to also retain the raw tweets obtained from Twitter, the end user may additionally choose to connect TwitterFeed to a different dataset.</p>
-<p>Let the feed run for a minute, then run the following query to see the latest tweets that are stored into the data set.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    for $i in dataset Tweets limit 10 return $i;
-</pre></div></div>
-
-<p>The dataflow of data from a feed can be terminated explicitly by <tt>stop feed</tt> statement.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    stop feed TwitterFeed;
-</pre></div></div>
-
-<p>The <tt>disconnnect statement</tt> can be used to disconnect the feed from certain dataset.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    disconnect feed TwitterFeed from dataset Tweets;
-</pre></div></div>
-</div></div>
-<div class="section">
-<h3><a name="Ingesting_with_Other_Adapters"></a>Ingesting with Other Adapters</h3>
-<p>AsterixDB has several builtin feed adapters for data ingestion. User can also implement their own adapters and plug them into AsterixDB. Here we introduce <tt>rss_feed</tt>, <tt>socket_adapter</tt> and <tt>localfs</tt> feed adapter that cover most of the common application scenarios.</p>
-<div class="section">
-<div class="section">
-<h5><a name="Using_the_.E2.80.9Crss_feed.E2.80.9D_feed_adapter"></a>Using the &#x201c;rss_feed&#x201d; feed adapter</h5>
-<p><tt>rss_feed</tt> adapter allows retrieving data given a collection of RSS end point URLs. As observed in the case of ingesting tweets, it is required to model an RSS data item using AQL.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create type Rss if not exists as open {
-        id: string,
-        title: string,
-        description: string,
-        link: string
-    };
-
-    create dataset RssDataset (Rss)
-    primary key id;
-</pre></div></div>
-
-<p>Next, we define an RSS feed using our built-in adapter &#x201c;rss_feed&#x201d;.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create feed my_feed using
-    rss_feed (
-       (&quot;type-name&quot;=&quot;Rss&quot;),
-       (&quot;format&quot;=&quot;rss&quot;),
-       (&quot;url&quot;=&quot;http://rss.cnn.com/rss/edition.rss&quot;)
-    );
-</pre></div></div>
-
-<p>In the above definition, the configuration parameter &#x201c;url&#x201d; can be a comma-separated list that reflects a collection of RSS URLs, where each URL corresponds to an RSS endpoint or an RSS feed. The &#x201c;rss_feed&#x201d; retrieves data from each of the specified RSS URLs (comma separated values) in parallel.</p>
-<p>The following statements connect the feed into the <tt>RssDataset</tt>:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    connect feed my_feed to dataset RssDataset;
-</pre></div></div>
-
-<p>The following statements activate the feed and start the dataflow:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    start feed my_feed;
-</pre></div></div>
-
-<p>The following statements show the latest data from the data set, stop the feed, and disconnect the feed from the data set.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    for $i in dataset RssDataset limit 10 return $i;
-
-    stop feed my_feed
-
-    disconnect feed my_feed from dataset RssDataset;
-</pre></div></div>
-</div>
-<div class="section">
-<h5><a name="Using_the_.E2.80.9Csocket_adapter.E2.80.9D_feed_adapter"></a>Using the &#x201c;socket_adapter&#x201d; feed adapter</h5>
-<p><tt>socket_adapter</tt> feed opens a web socket on the given node which allows user to push data into AsterixDB directly. Here is an example:</p>
-
-<div>
-<div>
-<pre class="source">    drop dataverse feeds if exists;
-    create dataverse feeds;
-    use dataverse feeds;
-
-    create type TestDataType as open {
-       screenName: string
-    }
-
-    create dataset TestDataset(TestDataType) primary key screenName;
-
-    create feed TestSocketFeed using socket_adapter
-    (
-       (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
-       (&quot;address-type&quot;=&quot;IP&quot;),
-       (&quot;type-name&quot;=&quot;TestDataType&quot;),
-       (&quot;format&quot;=&quot;adm&quot;)
-    );
-
-    connect feed TestSocketFeed to dataset TestDataset;
-
-    use dataverse feeds;
-    start feed TestSocketFeed;
-</pre></div></div>
-
-<p>The above statements create a socket feed which is listening to &#x201c;10001&#x201d; port of the host machine. This feed accepts data records in &#x201c;adm&#x201d; format. As an example, you can download the sample dataset <a href="../data/chu.adm">Chirp Users</a> and push them line by line into the socket feed using any socket client you like. Following is a socket client example in Python:</p>
-
-<div>
-<div>
-<pre class="source">    from socket import socket
-
-    ip = '127.0.0.1'
-    port1 = 10001
-    filePath = 'chu.adm'
-
-    sock1 = socket()
-    sock1.connect((ip, port1))
-
-    with open(filePath) as inputData:
-        for line in inputData:
-            sock1.sendall(line)
-        sock1.close()
-</pre></div></div>
-</div></div>
-<div class="section">
-<h4><a name="Using_the_.E2.80.9Clocalfs.E2.80.9D_feed_adapter"></a>Using the &#x201c;localfs&#x201d; feed adapter</h4>
-<p><tt>localfs</tt> adapter enables data ingestion from local file system. It allows user to feed data records on local disk into a dataset. A DDL example for creating a <tt>localfs</tt> feed is given as follow:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create type TweetType as closed {
-      id: string,
-      username : string,
-      location : string,
-      text : string,
-      timestamp : string
-    }
-
-    create dataset Tweets(TweetType)
-    primary key id;
-
-    create feed TweetFeed
-    using localfs
-    ((&quot;type-name&quot;=&quot;TweetType&quot;),(&quot;path&quot;=&quot;HOSTNAME://LOCAL_FILE_PATH&quot;),(&quot;format&quot;=&quot;adm&quot;))
-</pre></div></div>
-
-<p>Similar to previous examples, we need to define the datatype and dataset this feed uses. The &#x201c;path&#x201d; parameter refers to the local datafile that we want to ingest data from. <tt>HOSTNAME</tt> can either be the IP address or node name of the machine which holds the file. <tt>LOCAL_FILE_PATH</tt> indicates the absolute path to the file on that machine. Similarly to <tt>socket_adapter</tt>, this feed takes <tt>adm</tt> formatted data records.</p></div></div>
-<div class="section">
-<h3><a name="Datatype_for_feed_and_target_dataset"></a>Datatype for feed and target dataset</h3>
-<p>The &#x201c;type-name&#x201d; parameter in create feed statement defines the <tt>datatype</tt> of the datasource. In most use cases, feed will have the same <tt>datatype</tt> as the target dataset. However, if we want to perform certain preprocess before the data records gets into the target dataset (append autogenerated key, apply user defined functions, etc.), we will need to define the datatypes for feed and dataset separately.</p>
-<div class="section">
-<h4><a name="Ingestion_with_autogenerated_key"></a>Ingestion with autogenerated key</h4>
-<p>AsterixDB supports using autogenerated uuid as the primary key for dataset. When we use this feature, we will need to define a datatype with the primary key field, and specify that field to be autogenerated when creating the dataset. Use that same datatype in feed definition will cause a type discrepancy since there is no such field in the datasource. Thus, we will need to define two separate datatypes for feed and dataset:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    create type DBLPFeedType as closed {
-      dblpid: string,
-      title: string,
-      authors: string,
-      misc: string
-    }
-
-    create type DBLPDataSetType as open {
-      id: uuid,
-      dblpid: string,
-      title: string,
-      authors: string,
-      misc: string
-    }
-    create dataset DBLPDataset(DBLPDataSetType) primary key id autogenerated;
-
-    create feed DBLPFeed using socket_adapter
-    (
-        (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
-        (&quot;address-type&quot;=&quot;IP&quot;),
-        (&quot;type-name&quot;=&quot;DBLPFeedType&quot;),
-        (&quot;format&quot;=&quot;adm&quot;)
-    );
-
-    connect feed DBLPFeed to dataset DBLPDataset;
-
-    start feed DBLPFeed;
-</pre></div></div>
-</div></div></div>
-<div class="section">
-<h2><a name="Policies_for_Feed_Ingestion"></a><a name="FeedPolicies">Policies for Feed Ingestion</a></h2>
-<p>Multiple feeds may be concurrently operational on an AsterixDB cluster, each competing for resources (CPU cycles, network bandwidth, disk IO) to maintain pace with their respective data sources. As a data management system, AsterixDB is able to manage a set of concurrent feeds and make dynamic decisions related to the allocation of resources, resolving resource bottlenecks and the handling of failures. Each feed has its own set of constraints, influenced largely by the nature of its data source and the applications that intend to consume and process the ingested data. Consider an application that intends to discover the trending topics on Twitter by analyzing tweets that are being processed. Losing a few tweets may be acceptable. In contrast, when ingesting from a data source that provides a click-stream of ad clicks, losing data would translate to a loss of revenue for an application that tracks revenue by charging advertisers per click.</p>
-<p>AsterixDB allows a data feed to have an associated ingestion policy that is expressed as a collection of parameters and associated values. An ingestion policy dictates the runtime behavior of the feed in response to resource bottlenecks and failures. AsterixDB provides a set of policies that help customize the system&#x2019;s runtime behavior when handling excess objects.</p>
-<div class="section">
-<div class="section">
-<h4><a name="Policies"></a>Policies</h4>
-<ul>
-
-<li>
-
-<p><i>Spill</i>: Objects that cannot be processed by an operator for lack of resources (referred to as excess objects hereafter) should be persisted to the local disk for deferred processing.</p>
-</li>
-<li>
-
-<p><i>Discard</i>: Excess objects should be discarded.</p>
-</li>
-</ul>
-<p>Note that the end user may choose to form a custom policy.  For example, it is possible in AsterixDB to create a custom policy that spills excess objects to disk and subsequently resorts to throttling if the spillage crosses a configured threshold. In all cases, the desired ingestion policy is specified as part of the <tt>connect feed</tt> statement or else the &#x201c;Basic&#x201d; policy will be chosen as the default.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse feeds;
-
-    connect feed TwitterFeed to dataset Tweets
-    using policy Basic;
-</pre></div></div></div></div></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/index.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/index.html b/content/docs/0.9.4/index.html
index c60841f..02923b1 100644
--- a/content/docs/0.9.4/index.html
+++ b/content/docs/0.9.4/index.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/index.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/index.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/ncservice.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/ncservice.html b/content/docs/0.9.4/ncservice.html
index f65561d..dd36797 100644
--- a/content/docs/0.9.4/ncservice.html
+++ b/content/docs/0.9.4/ncservice.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/ncservice.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/ncservice.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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181012" />
     <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Table of Contents</title>
+    <title>AsterixDB &#x2013; Installation using NCService</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" />
@@ -26,7 +26,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
+        <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>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">
@@ -90,6 +90,7 @@
  ! specific language governing permissions and limitations
  ! under the License.
  !-->
+<h1>Installation using NCService</h1>
 <div class="section">
 <h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
 <ul>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/overview.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/overview.html b/content/docs/0.9.4/overview.html
index 4f087c8..ba0ef11 100644
--- a/content/docs/0.9.4/overview.html
+++ b/content/docs/0.9.4/overview.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/overview.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/overview.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB: A Big Data Management System</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">


[06/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/csv.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/csv.html b/docs/0.9.4/csv.html
index 036c1ef..02a9830 100644
--- a/docs/0.9.4/csv.html
+++ b/docs/0.9.4/csv.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/csv.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/csv.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; CSV Support in AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><span class="none"></span>CSV Output</a></li>
       <li class="nav-header">Advanced Features</li>
-    <li><a href="aql/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/datamodel.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/datamodel.html b/docs/0.9.4/datamodel.html
new file mode 100644
index 0000000..4682c66
--- /dev/null
+++ b/docs/0.9.4/datamodel.html
@@ -0,0 +1,778 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/datamodel.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; The Asterix Data Model (ADM)</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 class="active"><a href="#"><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><a href="sqlpp/builtins.html" title="Builtin Functions"><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>The Asterix Data Model (ADM)</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="#PrimitiveTypes">Primitive Types</a>
+<ul>
+
+<li><a href="#PrimitiveTypesBoolean">Boolean</a></li>
+<li><a href="#PrimitiveTypesString">String</a></li>
+<li><a href="#PrimitiveTypesInt">Tinyint / Smallint / Integer (Int) / Bigint</a></li>
+<li><a href="#PrimitiveTypesFloat">Float</a></li>
+<li><a href="#PrimitiveTypesDouble">Double (Double Precision)</a></li>
+<li><a href="#PrimitiveTypesBinary">Binary</a></li>
+<li><a href="#PrimitiveTypesPoint">Point</a></li>
+<li><a href="#PrimitiveTypesLine">Line</a></li>
+<li><a href="#PrimitiveTypesRectangle">Rectangle</a></li>
+<li><a href="#PrimitiveTypesCircle">Circle</a></li>
+<li><a href="#PrimitiveTypesPolygon">Polygon</a></li>
+<li><a href="#PrimitiveTypesDate">Date</a></li>
+<li><a href="#PrimitiveTypesTime">Time</a></li>
+<li><a href="#PrimitiveTypesDateTime">Datetime (Timestamp)</a></li>
+<li><a href="#PrimitiveTypesDuration">Duration/Year_month_duration/Day_time_duration</a></li>
+<li><a href="#PrimitiveTypesInterval">Interval</a></li>
+<li><a href="#PrimitiveTypesUUID">UUID</a></li>
+</ul>
+</li>
+<li>[Incomplete Information Types] (#IncompleteInformationTypes)
+<ul>
+
+<li><a href="#IncompleteInformationTypesNull">Null</a></li>
+<li><a href="#IncompleteInformationTypesMissing">Missing</a></li>
+</ul>
+</li>
+<li><a href="#DerivedTypes">Derived Types</a>
+<ul>
+
+<li><a href="#DerivedTypesObject">Object</a></li>
+<li><a href="#DerivedTypesArray">Array</a></li>
+<li><a href="#DerivedTypesMultiset">Multiset</a></li>
+</ul>
+</li>
+</ul>
+<p>An instance of Asterix data model (ADM) can be a <i><i>primitive type</i></i> (<tt>boolean</tt>, <tt>tinyint</tt>, <tt>smallint</tt>, <tt>integer</tt>, <tt>bigint</tt>, <tt>string</tt>, <tt>float</tt>, <tt>double</tt>, <tt>date</tt>, <tt>time</tt>, <tt>datetime</tt>, etc.), a <i><i>special type</i></i> (<tt>null</tt> or <tt>missing</tt>), or a <i><i>derived type</i></i>.</p>
+<p>The type names are case-insensitive, e.g., both <tt>BIGINT</tt> and <tt>bigint</tt> are acceptable.</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="Primitive_Types"></a><a name="PrimitiveTypes" id="PrimitiveTypes">Primitive Types</a></h2>
+<div class="section">
+<h3><a name="Boolean"></a><a name="PrimitiveTypesBoolean" id="PrimitiveTypesBoolean">Boolean</a></h3>
+<p><tt>boolean</tt> data type can have one of the two values: <i><i>true</i></i> or <i><i>false</i></i>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;true&quot;: true, &quot;false&quot;: false };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;true&quot;: true, &quot;false&quot;: false }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="String"></a><a name="PrimitiveTypesString" id="PrimitiveTypesString">String</a></h3>
+<p><tt>string</tt> represents a sequence of characters. The total length of the sequence can be up to 2,147,483,648.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: string(&quot;This is a string.&quot;), &quot;v2&quot;: string(&quot;\&quot;This is a quoted string\&quot;&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;This is a string.&quot;, &quot;v2&quot;: &quot;\&quot;This is a quoted string\&quot;&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="Tinyint_.2F_Smallint_.2F_Integer_.28Int.29_.2F_Bigint"></a><a name="PrimitiveTypesInt" id="PrimitiveTypesInt">Tinyint / Smallint / Integer (Int) / Bigint</a></h3>
+<p>Integer types using 8, 16, 32, or 64 bits. The ranges of these types are:</p>
+<ul>
+
+<li><tt>tinyint</tt>: -128 to 127</li>
+<li><tt>smallint</tt>: -32768 to 32767</li>
+<li><tt>integer</tt>: -2147483648 to 2147483647</li>
+<li><tt>bigint</tt>: -9223372036854775808 to 9223372036854775807</li>
+</ul>
+<p><tt>int</tt> is an abbreviated alias for integer.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;tinyint&quot;: tiny(&quot;125&quot;), &quot;smallint&quot;: smallint(&quot;32765&quot;), &quot;integer&quot;: 294967295, &quot;bigint&quot;: bigint(&quot;1700000000000000000&quot;)};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;tinyint&quot;: 125, &quot;smallint&quot;: 32765, &quot;integer&quot;: 294967295, &quot;bigint&quot;: 1700000000000000000 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Float"></a><a name="PrimitiveTypesFloat" id="PrimitiveTypesFloat">Float</a></h3>
+<p><tt>float</tt> represents approximate numeric data values using 4 bytes. The range of a float value can be from 2^(-149) to (2-2^(-23)&#xb7;2^(127) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: float(&quot;NaN&quot;), &quot;v2&quot;: float(&quot;INF&quot;), &quot;v3&quot;: float(&quot;-INF&quot;), &quot;v4&quot;: float(&quot;-2013.5&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;NaN&quot;, &quot;v2&quot;: &quot;INF&quot;, &quot;v3&quot;: &quot;-INF&quot;, &quot;v4&quot;: -2013.5 }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Double_.28double_precision.29"></a><a name="PrimitiveTypesDouble" id="PrimitiveTypesDouble">Double (double precision)</a></h3>
+<p><tt>double</tt> represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))&#xb7;2^(1023) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: double(&quot;NaN&quot;), &quot;v2&quot;: double(&quot;INF&quot;), &quot;v3&quot;: double(&quot;-INF&quot;), &quot;v4&quot;: &quot;-2013.593823748327284&quot; };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: &quot;NaN&quot;, &quot;v2&quot;: &quot;INF&quot;, &quot;v3&quot;: &quot;-INF&quot;, &quot;v4&quot;: -2013.5938237483274 }
+</pre></div></div>
+</li>
+</ul>
+<p><tt>Double precision</tt> is an alias of <tt>double</tt>.</p></div>
+<div class="section">
+<h3><a name="Binary"></a><a name="PrimitiveTypesBinary" id="PrimitiveTypesBinary">Binary</a></h3>
+<p><tt>binary</tt> represents a sequence of bytes. It can be constructed from a <tt>hex</tt> or a <tt>base64</tt> string sequence. The total length of the byte sequence can be up to 2,147,483,648.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;hex1&quot; : hex(&quot;ABCDEF0123456789&quot;),
+  &quot;hex2&quot;: hex(&quot;abcdef0123456789&quot;),
+  &quot;base64_1&quot; : base64(&quot;0123456789qwertyui+/&quot;),
+  &quot;base64_2&quot; : base64('QXN0ZXJpeA==')
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The default output format is in <tt>hex</tt> format. Thus, the expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;hex1&quot;: hex(&quot;ABCDEF0123456789&quot;),
+  &quot;hex2&quot;: hex(&quot;ABCDEF0123456789&quot;),
+  &quot;base64_1&quot;: hex(&quot;D35DB7E39EBBF3DAB07ABB72BA2FBF&quot;),
+  &quot;base64_2&quot;: hex(&quot;41737465726978&quot;)
+}
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Point"></a><a name="PrimitiveTypesPoint" id="PrimitiveTypesPoint">Point</a></h3>
+<p><tt>point</tt> is the fundamental two-dimensional building block for spatial types. It consists of two <tt>double</tt> coordinates x and y.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: point(&quot;80.10d, -10E5&quot;), &quot;v2&quot;: point(&quot;5.10E-10d, -10E5&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: point(&quot;80.1,-1000000.0&quot;), &quot;v2&quot;: point(&quot;5.1E-10,-1000000.0&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Line"></a><a name="PrimitiveTypesLine" id="PrimitiveTypesLine">Line</a></h3>
+<p><tt>line</tt> consists of two points that represent the start and the end points of a line segment.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: line(&quot;10.1234,11.1e-1 +10.2E-2,-11.22&quot;), &quot;v2&quot;: line(&quot;0.1234,-1.00e-10 +10.5E-2,-01.02&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: line(&quot;10.1234,1.11 0.102,-11.22&quot;), &quot;v2&quot;: line(&quot;0.1234,-1.0E-10 0.105,-1.02&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Rectangle"></a><a name="PrimitiveTypesRectangle" id="PrimitiveTypesRectangle">Rectangle</a></h3>
+<p><tt>rectangle</tt> consists of two points that represent the <i><i>bottom left</i></i> and <i><i>upper right</i></i> corners of a rectangle.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: rectangle(&quot;5.1,11.8 87.6,15.6548&quot;), &quot;v2&quot;: rectangle(&quot;0.1234,-1.00e-10 5.5487,0.48765&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: rectangle(&quot;5.1,11.8 87.6,15.6548&quot;), &quot;v2&quot;: rectangle(&quot;0.1234,-1.0E-10 5.5487,0.48765&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Circle"></a><a name="PrimitiveTypesCircle" id="PrimitiveTypesCircle">Circle</a></h3>
+<p><tt>circle</tt> consists of one point that represents the center of the circle and a radius of type <tt>double</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: circle(&quot;10.1234,11.1e-1 +10.2E-2&quot;), &quot;v2&quot;: circle(&quot;0.1234,-1.00e-10 +10.5E-2&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: circle(&quot;10.1234,1.11 0.102&quot;), &quot;v2&quot;: circle(&quot;0.1234,-1.0E-10 0.105&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Polygon"></a><a name="PrimitiveTypesPolygon" id="PrimitiveTypesPolygon">Polygon</a></h3>
+<p><tt>polygon</tt> consists of <i><i>n</i></i> points that represent the vertices of a <i><i>simple closed</i></i> polygon.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: polygon(&quot;-1.2,+1.3e2 -2.14E+5,2.15 -3.5e+2,03.6 -4.6E-3,+4.81&quot;),
+  &quot;v2&quot;: polygon(&quot;-1.0,+10.5e2 -02.15E+50,2.5 -1.0,+3.3e3 -2.50E+05,20.15 +3.5e+2,03.6 -4.60E-3,+4.75 -2,+1.0e2 -2.00E+5,20.10 30.5,03.25 -4.33E-3,+4.75&quot;)
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: polygon(&quot;-1.2,130.0 -214000.0,2.15 -350.0,3.6 -0.0046,4.81&quot;),
+  &quot;v2&quot;: polygon(&quot;-1.0,1050.0 -2.15E50,2.5 -1.0,3300.0 -250000.0,20.15 350.0,3.6 -0.0046,4.75 -2.0,100.0 -200000.0,20.1 30.5,3.25 -0.00433,4.75&quot;) }
+}
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Date"></a><a name="PrimitiveTypesDate" id="PrimitiveTypesDate">Date</a></h3>
+<p><tt>date</tt> represents a time point along the Gregorian calendar system specified by the year, month and day. ASTERIX supports the date from <tt>-9999-01-01</tt> to <tt>9999-12-31</tt>.</p>
+<p>A date value can be represented in two formats, extended format and basic format.</p>
+<ul>
+
+<li>Extended format is represented as <tt>[-]yyyy-mm-dd</tt> for <tt>year-month-day</tt>. Each field should be padded if there are less digits than the format specified.</li>
+<li>Basic format is in the format of <tt>[-]yyyymmdd</tt>.</li>
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: date(&quot;2013-01-01&quot;), &quot;v2&quot;: date(&quot;-19700101&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: date(&quot;2013-01-01&quot;), &quot;v2&quot;: date(&quot;-1970-01-01&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Time"></a><a name="PrimitiveTypesTime" id="PrimitiveTypesTime">Time</a></h3>
+<p><tt>time</tt> type describes the time within the range of a day. It is represented by three fields: hour, minute and second. Millisecond field is optional as the fraction of the second field. Its extended format is as <tt>hh:mm:ss[.mmm]</tt> and the basic format is <tt>hhmmss[mmm]</tt>. The value domain is from <tt>00:00:00.000</tt> to <tt>23:59:59.999</tt>.</p>
+<p>Timezone field is optional for a time value. Timezone is represented as <tt>[+|-]hh:mm</tt> for extended format or <tt>[+|-]hhmm</tt> for basic format. Note that the sign designators cannot be omitted. <tt>Z</tt> can also be used to represent the UTC local time. If no timezone information is given, it is UTC by default.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: time(&quot;12:12:12.039Z&quot;), &quot;v2&quot;: time(&quot;000000000-0800&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: time(&quot;12:12:12.039Z&quot;), &quot;v2&quot;: time(&quot;08:00:00.000Z&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Datetime_.28Timestamp.29"></a><a name="PrimitiveTypesDateTime" id="PrimitiveTypesDateTime">Datetime (Timestamp)</a></h3>
+<p>A <tt>datetime</tt> value is a combination of an <tt>date</tt> and <tt>time</tt>, representing a fixed time point along the Gregorian calendar system. The value is among <tt>-9999-01-01 00:00:00.000</tt> and <tt>9999-12-31 23:59:59.999</tt>.</p>
+<p>A <tt>datetime</tt> value is represented as a combination of the representation of its <tt>date</tt> part and <tt>time</tt> part, separated by a separator <tt>T</tt>. Either extended or basic format can be used, and the two parts should be the same format.</p>
+<p>Millisecond field and timezone field are optional, as specified in the <tt>time</tt> type.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: datetime(&quot;2013-01-01T12:12:12.039Z&quot;), &quot;v2&quot;: datetime(&quot;-19700101T000000000-0800&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: datetime(&quot;2013-01-01T12:12:12.039Z&quot;), &quot;v2&quot;: datetime(&quot;-1970-01-01T08:00:00.000Z&quot;) }
+</pre></div></div>
+</li>
+</ul>
+<p><tt>timestamp</tt> is an alias of <tt>datetime</tt>.</p></div>
+<div class="section">
+<h3><a name="Duration.2FYear_month_duration.2FDay_time_duration"></a><a name="PrimitiveTypesDuration" id="PrimitiveTypesDuration">Duration/Year_month_duration/Day_time_duration</a></h3>
+<p><tt>duration</tt> represents a duration of time. A duration value is specified by integers on at least one of the following fields: year, month, day, hour, minute, second, and millisecond.</p>
+<p>A duration value is in the format of <tt>[-]PnYnMnDTnHnMn.mmmS</tt>. The millisecond part (as the fraction of the second field) is optional, and when no millisecond field is used, the decimal point should also be absent.</p>
+<p>Negative durations are also supported for the arithmetic operations between time instance types (<tt>date</tt>, <tt>time</tt> and <tt>datetime</tt>), and is used to roll the time back for the given duration. For example <tt>date(&quot;2012-01-01&quot;) + duration(&quot;-P3D&quot;)</tt> will return <tt>date(&quot;2011-12-29&quot;)</tt>.</p>
+<p>There are also two sub-duration types, namely <tt>year_month_duration</tt> and <tt>day_time_duration</tt>. <tt>year_month_duration</tt> represents only the years and months of a duration, while <tt>day_time_duration</tt> represents only the day to millisecond fields. Different from the <tt>duration</tt> type, both these two subtypes are totally ordered, so they can be used for comparison and index construction.</p>
+<p>Note that a canonical representation of the duration is always returned, regardless whether the duration is in the canonical representation or not from the user&#x2019;s input. More information about canonical representation can be found from <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-dayTimeDuration">XPath dayTimeDuration Canonical Representation</a> and <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-yearMonthDuration">yearMonthDuration Canonical Representation</a>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: duration(&quot;P100Y12MT12M&quot;), &quot;v2&quot;: duration(&quot;-PT20.943S&quot;) };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: duration(&quot;P101YT12M&quot;), &quot;v2&quot;: duration(&quot;-PT20.943S&quot;) }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Interval"></a><a name="PrimitiveTypesInterval" id="PrimitiveTypesInterval">Interval</a></h3>
+<p><tt>interval</tt> represents inclusive-exclusive ranges of time. It is defined by two time point values with the same temporal type(<tt>date</tt>, <tt>time</tt> or <tt>datetime</tt>).</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: interval(date(&quot;2013-01-01&quot;), date(&quot;20130505&quot;)),
+  &quot;v2&quot;: interval(time(&quot;00:01:01&quot;), time(&quot;213901049+0800&quot;)),
+  &quot;v3&quot;: interval(datetime(&quot;2013-01-01T00:01:01&quot;), datetime(&quot;20130505T213901049+0800&quot;))
+};
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{
+  &quot;v1&quot;: interval(date(&quot;2013-01-01&quot;), date(&quot;2013-05-05&quot;)),
+  &quot;v2&quot;: interval(time(&quot;00:01:01.000Z&quot;), time(&quot;13:39:01.049Z&quot;)),
+  &quot;v3&quot;: interval(datetime(&quot;2013-01-01T00:01:01.000Z&quot;), datetime(&quot;2013-05-05T13:39:01.049Z&quot;))
+}
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="UUID"></a><a name="PrimitiveTypesUUID" id="PrimitiveTypesUUID">UUID</a></h3>
+<p><tt>uuid</tt> represents a UUID value, which stands for Universally unique identifier. It is defined by a canonical format using hexadecimal text with inserted hyphen characters. (E.g.: 5a28ce1e-6a74-4201-9e8f-683256e5706f). This type is generally used to store auto-generated primary key values.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">return { &quot;v1&quot;:uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;) }
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;v1&quot;: uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&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="Incomplete_Information_Types"></a><a name="IncompleteInformationTypes" id="IncompleteInformationTypes">Incomplete Information Types</a></h2>
+<div class="section">
+<h3><a name="Null"></a><a name="IncompleteInformationTypesNull" id="IncompleteInformationTypesNull">Null</a></h3>
+<p><tt>null</tt> is a special value that is often used to represent an unknown value. For example, a user might not be able to know the value of a field and let it be <tt>null</tt>.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;field&quot;: null };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;field&quot;: null }
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h3><a name="Missing"></a><a name="IncompleteInformationTypesMissing" id="IncompleteInformationTypesMissing">Missing</a></h3>
+<p><tt>missing</tt> indicates that a name-value pair is missing from an object. If a missing name-value pair is accessed, an empty result value is returned by the query.</p>
+<p>As neither the data model nor the system enforces homogeneity for datasets or collections, items in a dataset or collection can be of heterogeneous types and so a field can be present in one object and <tt>missing</tt> in another.</p>
+<ul>
+
+<li>
+
+<p>Example:</p>
+
+<div>
+<div>
+<pre class="source">{ &quot;field&quot;: missing };
+</pre></div></div>
+</li>
+<li>
+
+<p>The expected result is:</p>
+
+<div>
+<div>
+<pre class="source">{  }
+</pre></div></div>
+</li>
+</ul>
+<p>Since a field with value <tt>missing</tt> means the field is absent, we get an empty object.</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>
+<div class="section">
+<h2><a name="Derived_Types"></a><a name="DerivedTypes" id="DerivedTypes">Derived Types</a></h2>
+<div class="section">
+<h3><a name="Object"></a><a name="DerivedTypesObject" id="DerivedTypesObject">Object</a></h3>
+<p>An <tt>object</tt> contains a set of &#xfb01;elds, where each &#xfb01;eld is described by its name and type. An object type may be defined as either open or closed. Open objects (instances of open object types) are permitted to contain &#xfb01;elds that are not part of the type de&#xfb01;nition, while closed objects do not permit their instances to carry extra fields. An example type definition for an object is:</p>
+
+<div>
+<div>
+<pre class="source">    create type SoldierType as open {
+        name: string?,
+        rank: string,
+        serialno: int
+    };
+</pre></div></div>
+
+<p>Syntactically, object constructors are surrounded by curly braces &#x201c;{&#x2026;}&#x201d;. Some examples of legitimate instances of the above type include:</p>
+
+<div>
+<div>
+<pre class="source">    { &quot;name&quot;: &quot;Joe Blow&quot;, &quot;rank&quot;: &quot;Sergeant&quot;, &quot;serialno&quot;: 1234567 }
+    { &quot;rank&quot;: &quot;Private&quot;, &quot;serialno&quot;: 9876543 }
+    { &quot;name&quot;: &quot;Sally Forth&quot;, &quot;rank&quot;: &quot;Major&quot;, &quot;serialno&quot;: 2345678, &quot;gender&quot;: &quot;F&quot; }
+</pre></div></div>
+
+<p>The first instance has all of the type&#x2019;s prescribed content. The second instance is missing the name field, which is fine because it is optional (due to the ?). The third instance has an extra field; that is fine because the type definition specifies that it is open (which is also true by default, if open is not specified). To more tightly control object content, specifying closed instead of open in the type definition for SoldierType would have made the third example instance an invalid instance of the type.</p></div>
+<div class="section">
+<h3><a name="Array"></a><a name="DerivedTypesArray" id="DerivedTypesArray">Array</a></h3>
+<p>An <tt>array</tt> is a container that holds a fixed number of values. Array constructors are denoted by brackets: &#x201c;[&#x2026;]&#x201d;.</p>
+<p>An example would be</p>
+
+<div>
+<div>
+<pre class="source">    [&quot;alice&quot;, 123, &quot;bob&quot;, null]
+</pre></div></div>
+</div>
+<div class="section">
+<h3><a name="Multiset"></a><a name="DerivedTypesMultiset" id="DerivedTypesMultiset">Multiset</a></h3>
+<p>A <tt>multiset</tt> is a generalization of the concept of a set that, unlike a set, allows multiple instances of the multiset&#x2019;s elements. Multiset constructors are denoted by two opening curly braces followed by data and two closing curly braces, like &#x201c;{{&#x2026;}}&#x201d;.</p>
+<p>An example would be</p>
+
+<div>
+<div>
+<pre class="source">    {{&quot;hello&quot;, 9328, &quot;world&quot;, [1, 2, null]}}
+</pre></div></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/feeds.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/feeds.html b/docs/0.9.4/feeds.html
new file mode 100644
index 0000000..93086c1
--- /dev/null
+++ b/docs/0.9.4/feeds.html
@@ -0,0 +1,468 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/feeds.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; Data Ingestion with Feeds</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><a href="sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>Data Ingestion with Feeds</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+<ul>
+
+<li><a href="#Introduction">Introduction</a></li>
+<li><a href="#FeedAdapters">Feed Adapters</a></li>
+<li><a href="#FeedPolicies">Feed Policies</a><!--
+! 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.
+!--></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction">Introduction</a></h2>
+<p>In this document, we describe the support for data ingestion in AsterixDB. Data feeds are a new mechanism for having continuous data arrive into a BDMS from external sources and incrementally populate a persisted dataset and associated indexes. We add a new BDMS architectural component, called a data feed, that makes a Big Data system the caretaker for functionality that used to live outside, and we show how it improves users&#x2019; lives and system performance.</p></div>
+<div class="section">
+<h2><a name="Feed_Adapters"></a><a name="FeedAdapters">Feed Adapters</a></h2>
+<p>The functionality of establishing a connection with a data source and receiving, parsing and translating its data into ADM objects (for storage inside AsterixDB) is contained in a feed adapter. A feed adapter is an implementation of an interface and its details are specific to a given data source. An adapter may optionally be given parameters to configure its runtime behavior. Depending upon the data transfer protocol/APIs offered by the data source, a feed adapter may operate in a push or a pull mode. Push mode involves just one initial request by the adapter to the data source for setting up the connection. Once a connection is authorized, the data source &#x201c;pushes&#x201d; data to the adapter without any subsequent requests by the adapter. In contrast, when operating in a pull mode, the adapter makes a separate request each time to receive data. AsterixDB currently provides built-in adapters for several popular data sources such as Twitter and RSS feeds. AsterixDB addition
 ally provides a generic socket-based adapter that can be used to ingest data that is directed at a prescribed socket.</p>
+<p>In this tutorial, we shall describe building two example data ingestion pipelines that cover the popular scenarios of ingesting data from (a) Twitter (b) RSS  (c) Socket Feed source.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Ingesting_Twitter_Stream"></a>Ingesting Twitter Stream</h4>
+<p>We shall use the built-in push-based Twitter adapter. As a pre-requisite, we must define a Tweet using the AsterixDB Data Model (ADM) and the AsterixDB Query Language (AQL). Given below are the type definitions in AQL that create a Tweet datatype which is representative of a real tweet as obtained from Twitter.</p>
+
+<div>
+<div>
+<pre class="source">    create dataverse feeds;
+    use dataverse feeds;
+
+    create type TwitterUser as closed {
+        screen_name: string,
+        lang: string,
+        friends_count: int32,
+        statuses_count: int32
+    };
+
+    create type Tweet as open {
+        id: int64,
+        user: TwitterUser
+    }
+
+    create dataset Tweets (Tweet)
+    primary key id;
+</pre></div></div>
+
+<p>We also create a dataset that we shall use to persist the tweets in AsterixDB. Next we make use of the <tt>create feed</tt> AQL statement to define our example data feed.</p>
+<div class="section">
+<h5><a name="Using_the_.E2.80.9Cpush_twitter.E2.80.9D_feed_adapter"></a>Using the &#x201c;push_twitter&#x201d; feed adapter</h5>
+<p>The &#x201c;push_twitter&#x201d; adapter requires setting up an application account with Twitter. To retrieve tweets, Twitter requires registering an application. Registration involves providing a name and a brief description for the application. Each application has associated OAuth authentication credentials that include OAuth keys and tokens. Accessing the Twitter API requires providing the following. 1. Consumer Key (API Key) 2. Consumer Secret (API Secret) 3. Access Token 4. Access Token Secret</p>
+<p>The &#x201c;push_twitter&#x201d; adapter takes as configuration the above mentioned parameters. End users are required to obtain the above authentication credentials prior to using the &#x201c;push_twitter&#x201d; adapter. For further information on obtaining OAuth keys and tokens and registering an application with Twitter, please visit <a class="externalLink" href="http://apps.twitter.com">http://apps.twitter.com</a>.</p>
+<p>Note that AsterixDB uses the Twitter4J API for getting data from Twitter. Due to a license conflict, Apache AsterixDB cannot ship the Twitter4J library. To use the Twitter adapter in AsterixDB, please download the necessary dependencies (<tt>twitter4j-core-4.0.x.jar</tt> and <tt>twitter4j-stream-4.0.x.jar</tt>) and drop them into the <tt>repo/</tt> directory before AsterixDB starts.</p>
+<p>Given below is an example AQL statement that creates a feed called &#x201c;TwitterFeed&#x201d; by using the &#x201c;push_twitter&#x201d; adapter.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+     (&quot;format&quot;=&quot;twitter-status&quot;),
+     (&quot;consumer.key&quot;=&quot;************&quot;),
+     (&quot;consumer.secret&quot;=&quot;**************&quot;),
+     (&quot;access.token&quot;=&quot;**********&quot;),
+     (&quot;access.token.secret&quot;=&quot;*************&quot;));
+</pre></div></div>
+
+<p>It is required that the above authentication parameters are provided valid. Note that the <tt>create feed</tt> statement does not initiate the flow of data from Twitter into the AsterixDB instance. Instead, the <tt>create feed</tt> statement only results in registering the feed with the instance. The flow of data along a feed is initiated when it is connected to a target dataset using the connect feed statement and activated using the start feed statement.</p>
+<p>The Twitter adapter also supports several Twitter streaming APIs as follow:</p>
+<ol style="list-style-type: decimal">
+
+<li>Track filter (&#x201c;keywords&#x201d;=&#x201c;AsterixDB, Apache&#x201d;)</li>
+<li>Locations filter (&#x201c;locations&#x201d;=&#x201c;-29.7, 79.2, 36.7, 72.0; -124.848974,-66.885444, 24.396308, 49.384358&#x201d;)</li>
+<li>Language filter (&#x201c;language&#x201d;=&#x201c;en&#x201d;)</li>
+<li>Filter level (&#x201c;filter-level&#x201d;=&#x201c;low&#x201d;)</li>
+</ol>
+<p>An example of Twitter adapter tracking tweets with keyword &#x201c;news&#x201d; can be described using following ddl:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create feed TwitterFeed if not exists using &quot;push_twitter&quot;
+    ((&quot;type-name&quot;=&quot;Tweet&quot;),
+     (&quot;format&quot;=&quot;twitter-status&quot;),
+     (&quot;consumer.key&quot;=&quot;************&quot;),
+     (&quot;consumer.secret&quot;=&quot;**************&quot;),
+     (&quot;access.token&quot;=&quot;**********&quot;),
+     (&quot;access.token.secret&quot;=&quot;*************&quot;),
+     (&quot;keywords&quot;=&quot;news&quot;));
+</pre></div></div>
+
+<p>For more details about these APIs, please visit <a class="externalLink" href="https://dev.twitter.com/streaming/overview/request-parameters">https://dev.twitter.com/streaming/overview/request-parameters</a></p></div></div>
+<div class="section">
+<h4><a name="Lifecycle_of_a_Feed"></a>Lifecycle of a Feed</h4>
+<p>A feed is a logical artifact that is brought to life (i.e., its data flow is initiated) only when it is activated using the <tt>start feed</tt> statement. Before we active a feed, we need to designate the dataset where the data to be persisted using <tt>connect feed</tt> statement. Subsequent to a <tt>connect feed</tt> statement, the feed is said to be in the connected state. After that, <tt>start feed</tt> statement will activate the feed, and start the dataflow from feed to its connected dataset. Multiple feeds can simultaneously be connected to a dataset such that the contents of the dataset represent the union of the connected feeds. Also one feed can be simultaneously connected to multiple target datasets.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets;
+
+    start feed TwitterFeed;
+</pre></div></div>
+
+<p>The <tt>connect feed</tt> statement above directs AsterixDB to persist the data from <tt>TwitterFeed</tt> feed into the <tt>Tweets</tt> dataset. The <tt>start feed</tt> statement will activate the feed and start the dataflow. If it is required (by the high-level application) to also retain the raw tweets obtained from Twitter, the end user may additionally choose to connect TwitterFeed to a different dataset.</p>
+<p>Let the feed run for a minute, then run the following query to see the latest tweets that are stored into the data set.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    for $i in dataset Tweets limit 10 return $i;
+</pre></div></div>
+
+<p>The dataflow of data from a feed can be terminated explicitly by <tt>stop feed</tt> statement.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    stop feed TwitterFeed;
+</pre></div></div>
+
+<p>The <tt>disconnnect statement</tt> can be used to disconnect the feed from certain dataset.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    disconnect feed TwitterFeed from dataset Tweets;
+</pre></div></div>
+</div></div>
+<div class="section">
+<h3><a name="Ingesting_with_Other_Adapters"></a>Ingesting with Other Adapters</h3>
+<p>AsterixDB has several builtin feed adapters for data ingestion. User can also implement their own adapters and plug them into AsterixDB. Here we introduce <tt>rss_feed</tt>, <tt>socket_adapter</tt> and <tt>localfs</tt> feed adapter that cover most of the common application scenarios.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Using_the_.E2.80.9Crss_feed.E2.80.9D_feed_adapter"></a>Using the &#x201c;rss_feed&#x201d; feed adapter</h5>
+<p><tt>rss_feed</tt> adapter allows retrieving data given a collection of RSS end point URLs. As observed in the case of ingesting tweets, it is required to model an RSS data item using AQL.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create type Rss if not exists as open {
+        id: string,
+        title: string,
+        description: string,
+        link: string
+    };
+
+    create dataset RssDataset (Rss)
+    primary key id;
+</pre></div></div>
+
+<p>Next, we define an RSS feed using our built-in adapter &#x201c;rss_feed&#x201d;.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create feed my_feed using
+    rss_feed (
+       (&quot;type-name&quot;=&quot;Rss&quot;),
+       (&quot;format&quot;=&quot;rss&quot;),
+       (&quot;url&quot;=&quot;http://rss.cnn.com/rss/edition.rss&quot;)
+    );
+</pre></div></div>
+
+<p>In the above definition, the configuration parameter &#x201c;url&#x201d; can be a comma-separated list that reflects a collection of RSS URLs, where each URL corresponds to an RSS endpoint or an RSS feed. The &#x201c;rss_feed&#x201d; retrieves data from each of the specified RSS URLs (comma separated values) in parallel.</p>
+<p>The following statements connect the feed into the <tt>RssDataset</tt>:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    connect feed my_feed to dataset RssDataset;
+</pre></div></div>
+
+<p>The following statements activate the feed and start the dataflow:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    start feed my_feed;
+</pre></div></div>
+
+<p>The following statements show the latest data from the data set, stop the feed, and disconnect the feed from the data set.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    for $i in dataset RssDataset limit 10 return $i;
+
+    stop feed my_feed
+
+    disconnect feed my_feed from dataset RssDataset;
+</pre></div></div>
+</div>
+<div class="section">
+<h5><a name="Using_the_.E2.80.9Csocket_adapter.E2.80.9D_feed_adapter"></a>Using the &#x201c;socket_adapter&#x201d; feed adapter</h5>
+<p><tt>socket_adapter</tt> feed opens a web socket on the given node which allows user to push data into AsterixDB directly. Here is an example:</p>
+
+<div>
+<div>
+<pre class="source">    drop dataverse feeds if exists;
+    create dataverse feeds;
+    use dataverse feeds;
+
+    create type TestDataType as open {
+       screenName: string
+    }
+
+    create dataset TestDataset(TestDataType) primary key screenName;
+
+    create feed TestSocketFeed using socket_adapter
+    (
+       (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
+       (&quot;address-type&quot;=&quot;IP&quot;),
+       (&quot;type-name&quot;=&quot;TestDataType&quot;),
+       (&quot;format&quot;=&quot;adm&quot;)
+    );
+
+    connect feed TestSocketFeed to dataset TestDataset;
+
+    use dataverse feeds;
+    start feed TestSocketFeed;
+</pre></div></div>
+
+<p>The above statements create a socket feed which is listening to &#x201c;10001&#x201d; port of the host machine. This feed accepts data records in &#x201c;adm&#x201d; format. As an example, you can download the sample dataset <a href="../data/chu.adm">Chirp Users</a> and push them line by line into the socket feed using any socket client you like. Following is a socket client example in Python:</p>
+
+<div>
+<div>
+<pre class="source">    from socket import socket
+
+    ip = '127.0.0.1'
+    port1 = 10001
+    filePath = 'chu.adm'
+
+    sock1 = socket()
+    sock1.connect((ip, port1))
+
+    with open(filePath) as inputData:
+        for line in inputData:
+            sock1.sendall(line)
+        sock1.close()
+</pre></div></div>
+</div></div>
+<div class="section">
+<h4><a name="Using_the_.E2.80.9Clocalfs.E2.80.9D_feed_adapter"></a>Using the &#x201c;localfs&#x201d; feed adapter</h4>
+<p><tt>localfs</tt> adapter enables data ingestion from local file system. It allows user to feed data records on local disk into a dataset. A DDL example for creating a <tt>localfs</tt> feed is given as follow:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create type TweetType as closed {
+      id: string,
+      username : string,
+      location : string,
+      text : string,
+      timestamp : string
+    }
+
+    create dataset Tweets(TweetType)
+    primary key id;
+
+    create feed TweetFeed
+    using localfs
+    ((&quot;type-name&quot;=&quot;TweetType&quot;),(&quot;path&quot;=&quot;HOSTNAME://LOCAL_FILE_PATH&quot;),(&quot;format&quot;=&quot;adm&quot;))
+</pre></div></div>
+
+<p>Similar to previous examples, we need to define the datatype and dataset this feed uses. The &#x201c;path&#x201d; parameter refers to the local datafile that we want to ingest data from. <tt>HOSTNAME</tt> can either be the IP address or node name of the machine which holds the file. <tt>LOCAL_FILE_PATH</tt> indicates the absolute path to the file on that machine. Similarly to <tt>socket_adapter</tt>, this feed takes <tt>adm</tt> formatted data records.</p></div></div>
+<div class="section">
+<h3><a name="Datatype_for_feed_and_target_dataset"></a>Datatype for feed and target dataset</h3>
+<p>The &#x201c;type-name&#x201d; parameter in create feed statement defines the <tt>datatype</tt> of the datasource. In most use cases, feed will have the same <tt>datatype</tt> as the target dataset. However, if we want to perform certain preprocess before the data records gets into the target dataset (append autogenerated key, apply user defined functions, etc.), we will need to define the datatypes for feed and dataset separately.</p>
+<div class="section">
+<h4><a name="Ingestion_with_autogenerated_key"></a>Ingestion with autogenerated key</h4>
+<p>AsterixDB supports using autogenerated uuid as the primary key for dataset. When we use this feature, we will need to define a datatype with the primary key field, and specify that field to be autogenerated when creating the dataset. Use that same datatype in feed definition will cause a type discrepancy since there is no such field in the datasource. Thus, we will need to define two separate datatypes for feed and dataset:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    create type DBLPFeedType as closed {
+      dblpid: string,
+      title: string,
+      authors: string,
+      misc: string
+    }
+
+    create type DBLPDataSetType as open {
+      id: uuid,
+      dblpid: string,
+      title: string,
+      authors: string,
+      misc: string
+    }
+    create dataset DBLPDataset(DBLPDataSetType) primary key id autogenerated;
+
+    create feed DBLPFeed using socket_adapter
+    (
+        (&quot;sockets&quot;=&quot;127.0.0.1:10001&quot;),
+        (&quot;address-type&quot;=&quot;IP&quot;),
+        (&quot;type-name&quot;=&quot;DBLPFeedType&quot;),
+        (&quot;format&quot;=&quot;adm&quot;)
+    );
+
+    connect feed DBLPFeed to dataset DBLPDataset;
+
+    start feed DBLPFeed;
+</pre></div></div>
+</div></div></div>
+<div class="section">
+<h2><a name="Policies_for_Feed_Ingestion"></a><a name="FeedPolicies">Policies for Feed Ingestion</a></h2>
+<p>Multiple feeds may be concurrently operational on an AsterixDB cluster, each competing for resources (CPU cycles, network bandwidth, disk IO) to maintain pace with their respective data sources. As a data management system, AsterixDB is able to manage a set of concurrent feeds and make dynamic decisions related to the allocation of resources, resolving resource bottlenecks and the handling of failures. Each feed has its own set of constraints, influenced largely by the nature of its data source and the applications that intend to consume and process the ingested data. Consider an application that intends to discover the trending topics on Twitter by analyzing tweets that are being processed. Losing a few tweets may be acceptable. In contrast, when ingesting from a data source that provides a click-stream of ad clicks, losing data would translate to a loss of revenue for an application that tracks revenue by charging advertisers per click.</p>
+<p>AsterixDB allows a data feed to have an associated ingestion policy that is expressed as a collection of parameters and associated values. An ingestion policy dictates the runtime behavior of the feed in response to resource bottlenecks and failures. AsterixDB provides a set of policies that help customize the system&#x2019;s runtime behavior when handling excess objects.</p>
+<div class="section">
+<div class="section">
+<h4><a name="Policies"></a>Policies</h4>
+<ul>
+
+<li>
+
+<p><i>Spill</i>: Objects that cannot be processed by an operator for lack of resources (referred to as excess objects hereafter) should be persisted to the local disk for deferred processing.</p>
+</li>
+<li>
+
+<p><i>Discard</i>: Excess objects should be discarded.</p>
+</li>
+</ul>
+<p>Note that the end user may choose to form a custom policy.  For example, it is possible in AsterixDB to create a custom policy that spills excess objects to disk and subsequently resorts to throttling if the spillage crosses a configured threshold. In all cases, the desired ingestion policy is specified as part of the <tt>connect feed</tt> statement or else the &#x201c;Basic&#x201d; policy will be chosen as the default.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse feeds;
+
+    connect feed TwitterFeed to dataset Tweets
+    using policy Basic;
+</pre></div></div></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>


[07/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/externaldata.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/externaldata.html b/docs/0.9.4/aql/externaldata.html
index 6c06dc9..5cbe512 100644
--- a/docs/0.9.4/aql/externaldata.html
+++ b/docs/0.9.4/aql/externaldata.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/externaldata.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/externaldata.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Accessing External Data in AsterixDB</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li class="active"><a href="#"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/filters.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/filters.html b/docs/0.9.4/aql/filters.html
deleted file mode 100644
index 8c18a52..0000000
--- a/docs/0.9.4/aql/filters.html
+++ /dev/null
@@ -1,142 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/filters.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Filter-Based LSM Index Acceleration</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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>Filter-Based LSM Index Acceleration</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="#Motivation">Motivation</a></li>
-<li><a href="#FiltersInAsterixDB">Filters in AsterixDB</a></li>
-<li><a href="#FiltersAndMergePolicies">Filters and Merge Policies</a></li>
-</ul></div>
-<div class="section">
-<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>Traditional relational databases usually employ conventional index structures such as B+ trees due to their low read latency.  However, such traditional index structures use in-place writes to perform updates, resulting in costly random writes to disk. Today&#x2019;s emerging applications often involve insert-intensive workloads for which the cost of random writes prohibits efficient ingestion of data. Consequently, popular NoSQL systems such as Cassandra, HBase, LevelDB, BigTable, etc. have adopted Log-Structured Merge (LSM) Trees as their storage structure. LSM-trees avoids the cost of random writes by batching updates into a component of the index that resides in main memory &#x2013; an <i>in-memory component</i>. When the space occupancy of the in-memory component exceeds a specified threshold, its entries are <i>flushed</i> to disk forming a new component &#x2013; a <i>disk component</i>. As disk components accumulate on disk, they are periodically merged together subject to
  a <i>merge policy</i> that decides when and what to merge. The benefit of the LSM-trees comes at the cost of possibly sacrificing read efficiency, but, it has been shown in previous studies that these inefficiencies can be mostly mitigated.</p>
-<p>AsterixDB has also embraced LSM-trees, not just by using them as primary indexes, but also by using the same LSM-ification technique for all of its secondary index structures. In particular, AsterixDB adopted a generic framework for converting a class of indexes (that includes conventional B+ trees, R trees, and inverted indexes) into LSM-based secondary indexes, allowing higher data ingestion rates. In fact, for certain index structures, our results have shown that using an LSM-based version of an index can be made to significantly outperform its conventional counterpart for <i>both</i> ingestion and query speed (an example of such an index being the R-tree for spatial data).</p>
-<p>Since an LSM-based index naturally partitions data into multiple disk components, it is possible, when answering certain queries, to exploit partitioning to only access some components and safely filter out the remaining components, thus reducing query times. For instance, referring to our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, suppose a user always retrieves tweets from the <tt>TweetMessages</tt> dataset based on the <tt>send-time</tt> field (e.g., tweets posted in the last 24 hours). Since there is not a secondary index on the <tt>send-time</tt> field, the only available option for AsterixDB would be to scan the whole <tt>TweetMessages</tt> dataset and then apply the predicate as a post-processing step. However, if disk components of the primary index were tagged with the minimum and maximum timestamp values of the objects they contain, we could utilize the tagged information to directly access the primary index and prune comp
 onents that do not match the query predicate. Thus, we could save substantial cost by avoiding scanning the whole dataset and only access the relevant components. We simply call such tagging information that are associated with components, filters. (Note that even if there were a secondary index on <tt>send-time</tt> field, using filters could save substantial cost by avoiding accessing the secondary index, followed by probing the primary index for every fetched entry.) Moreover, the same filtering technique can also be used with any secondary LSM index (e.g., an LSM R-tree), in case the query contains multiple predicates (e.g., spatial and temporal predicates), to obtain similar pruning power.</p></div>
-<div class="section">
-<h2><a name="Filters_in_AsterixDB_.5BBack_to_TOC.5D"></a><a name="FiltersInAsterixDB" id="FiltersInAsterixDB">Filters in AsterixDB</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>We have added support for LSM-based filters to all of AsterixDB&#x2019;s index types. To enable the use of filters, the user must specify the filter&#x2019;s key when creating a dataset, as shown below:</p>
-<div class="section">
-<div class="section">
-<h4><a name="Creating_a_Dataset_with_a_Filter"></a>Creating a Dataset with a Filter</h4>
-
-<div>
-<div>
-<pre class="source">    create dataset Tweets(TweetType) primary key tweetid with filter on send-time;
-</pre></div></div>
-
-<p>Filters can be created on any totally ordered datatype (i.e., any field that can be indexed using a B+ -tree), such as integers, doubles, floats, UUIDs, datetimes, etc.</p>
-<p>When a dataset with a filter is created, the name of the filter&#x2019;s key field is persisted in the <tt>Metadata.Dataset</tt> dataset (which is the metadata dataset that stores the details of each dataset in an AsterixDB instance) so that DML operations against the dataset can recognize the existence of filters and can update them or utilize them accordingly. Creating a dataset with a filter in AsterixDB implies that the primary and all secondary indexes of that dataset will maintain filters on their disk components. Once a filtered dataset is created, the user can use the dataset normally (just like any other dataset). AsterixDB will automatically maintain the filters and will leverage them to efficiently answer queries whenever possible (i.e., when a query has predicates on the filter&#x2019;s key).</p></div></div></div>
-<div class="section">
-<h2><a name="Filters_and_Merge_Policies_.5BBack_to_TOC.5D"></a><a name="FiltersAndMergePolicies" id="FiltersAndMergePolicies">Filters and Merge Policies</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>The AsterixDB default merge policy, the prefix merge policy, relies on component sizes and the number of components to decide which components to merge. This merge policy has proven to provide excellent performance for both ingestion and queries. However, when evaluating our filtering solution with the prefix policy, we observed a behavior that can reduce filter effectiveness. In particular, we noticed that under the prefix merge policy, the disk components of a secondary index tend to be constantly merged into a single component. This is because the prefix policy relies on a single size parameter for all of the indexes of a dataset. This parameter is typically chosen based on the sizes of the disk components of the primary index, which tend to be much larger than the sizes of the secondary indexes&#x2019; disk components. This difference caused the prefix merge policy to behave similarly to the constant merge policy (i.e., relatively poorly) when applied to secondary indexes in 
 the sense that the secondary indexes are constantly merged into a single disk component. Consequently, the effectiveness of filters on secondary indexes was greatly reduced under the prefix-merge policy, but they were still effective when probing the primary index.  Based on this behavior, we developed a new merge policy, an improved version of the prefix policy, called the correlated-prefix policy. The basic idea of this policy is that it delegates the decision of merging the disk components of all the indexes in a dataset to the primary index. When the policy decides that the primary index needs to be merged (using the same decision criteria as for the prefix policy), then it will issue successive merge requests to the I/O scheduler on behalf of all other indexes associated with the same dataset. The end result is that secondary indexes will always have the same number of disk components as their primary index under the correlated-prefix merge policy. This has improved query perfo
 rmance, since disk components of secondary indexes now have a much better chance of being pruned.</p></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/fulltext.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/fulltext.html b/docs/0.9.4/aql/fulltext.html
deleted file mode 100644
index 022e124..0000000
--- a/docs/0.9.4/aql/fulltext.html
+++ /dev/null
@@ -1,208 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/fulltext.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; AsterixDB  Support of Full-text search queries</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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>AsterixDB  Support of Full-text search queries</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="#Motivation">Motivation</a></li>
-<li><a href="#Syntax">Syntax</a></li>
-<li><a href="#FulltextIndex">Creating and utilizing a Full-text index</a></li>
-</ul></div>
-<div class="section">
-<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>Full-Text Search (FTS) queries are widely used in applications where users need to find records that satisfy an FTS predicate, i.e., where simple string-based matching is not sufficient. These queries are important when finding documents that contain a certain keyword is crucial. FTS queries are different from substring matching queries in that FTS queries find their query predicates as exact keywords in the given string, rather than treating a query predicate as a sequence of characters. For example, an FTS query that finds &#x201c;rain&#x201d; correctly returns a document when it contains &#x201c;rain&#x201d; as a word. However, a substring-matching query returns a document whenever it contains &#x201c;rain&#x201d; as a substring, for instance, a document with &#x201c;brain&#x201d; or &#x201c;training&#x201d; would be returned as well.</p></div>
-<div class="section">
-<h2><a name="Syntax_.5BBack_to_TOC.5D"></a><a name="Syntax" id="Syntax">Syntax</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>The syntax of AsterixDB FTS follows a portion of the XQuery FullText Search syntax. Two basic forms are as follows:</p>
-
-<div>
-<div>
-<pre class="source">    ftcontains(Expression1, Expression2, {FullTextOption})
-    ftcontains(Expression1, Expression2)
-</pre></div></div>
-
-<p>For example, we can execute the following query to find tweet messages where the <tt>message-text</tt> field includes &#x201c;voice&#x201d; as a word. Please note that an FTS search is case-insensitive. Thus, &#x201c;Voice&#x201d; or &#x201c;voice&#x201d; will be evaluated as the same word.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $msg in dataset TweetMessages
-    where ftcontains($msg.message-text, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
-    return {&quot;id&quot;: $msg.id}
-</pre></div></div>
-
-<p>The DDL and DML of TinySocial can be found in <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">ADM: Modeling Semistructed Data in AsterixDB</a>.</p>
-<p>The same query can be also expressed in the SQL++.</p>
-
-<div>
-<div>
-<pre class="source">    use TinySocial;
-
-    select element {&quot;id&quot;:msg.id}
-    from TweetMessages as msg
-    where TinySocial.ftcontains(msg.`message-text`, &quot;voice&quot;, {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>The <tt>Expression1</tt> is an expression that should be evaluable as a string at runtime as in the above example where <tt>$msg.message-text</tt> is a string field. The <tt>Expression2</tt> can be a string, an (un)ordered list of string value(s), or an expression. In the last case, the given expression should be evaluable into one of the first two types, i.e., into a string value or an (un)ordered list of string value(s).</p>
-<p>The following examples are all valid expressions.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound&quot;)
-   ... where ftcontains($msg.message-text, &quot;sound&quot;, {&quot;mode&quot;:&quot;any&quot;})
-   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
-   ... where ftcontains($msg.message-text, {{&quot;speed&quot;, &quot;stand&quot;, &quot;customization&quot;}}, {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, let $keyword_list := [&quot;voice&quot;, &quot;system&quot;] return $keyword_list, {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, $keyword_list, {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>In the last example above, <tt>$keyword_list</tt> should evaluate to a string or an (un)ordered list of string value(s).</p>
-<p>The last <tt>FullTextOption</tt> parameter clarifies the given FTS request. If you omit the <tt>FullTextOption</tt> parameter, then the default value will be set for each possible option. Currently, we only have one option named <tt>mode</tt>. And as we extend the FTS feature, more options will be added. Please note that the format of <tt>FullTextOption</tt> is a record, thus you need to put the option(s) in a record <tt>{}</tt>. The <tt>mode</tt> option indicates whether the given FTS query is a conjunctive (AND) or disjunctive (OR) search request. This option can be either <tt>&#x201c;any&#x201d;</tt> or <tt>&#x201c;all&#x201d;</tt>. The default value for <tt>mode</tt> is <tt>&#x201c;all&#x201d;</tt>. If one specifies <tt>&#x201c;any&#x201d;</tt>, a disjunctive search will be conducted. For example, the following query will find documents whose <tt>message-text</tt> field contains &#x201c;sound&#x201d; or &#x201c;system&#x201d;, so a document will be returned if it contains eit
 her &#x201c;sound&#x201d;, &#x201c;system&#x201d;, or both of the keywords.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>The other option parameter,<tt>&#x201c;all&#x201d;</tt>, specifies a conjunctive search. The following examples will find the documents whose <tt>message-text</tt> field contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;. If a document contains only &#x201c;sound&#x201d; or &#x201c;system&#x201d; but not both, it will not be returned.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
-</pre></div></div>
-
-<p>Currently AsterixDB doesn&#x2019;t (yet) support phrase searches, so the following query will not work.</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, &quot;sound system&quot;, {&quot;mode&quot;:&quot;any&quot;})
-</pre></div></div>
-
-<p>As a workaround solution, the following query can be used to achieve a roughly similar goal. The difference is that the following queries will find documents where <tt>$msg.message-text</tt> contains both &#x201c;sound&#x201d; and &#x201c;system&#x201d;, but the order and adjacency of &#x201c;sound&#x201d; and &#x201c;system&#x201d; are not checked, unlike in a phrase search. As a result, the query below would also return documents with &#x201c;sound system can be installed.&#x201d;, &#x201c;system sound is perfect.&#x201d;, or &#x201c;sound is not clear. You may need to install a new system.&#x201d;</p>
-
-<div>
-<div>
-<pre class="source">   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;], {&quot;mode&quot;:&quot;all&quot;})
-   ... where ftcontains($msg.message-text, [&quot;sound&quot;, &quot;system&quot;])
-</pre></div></div>
-</div>
-<div class="section">
-<h2><a name="Creating_and_utilizing_a_Full-text_index_.5BBack_to_TOC.5D"></a><a name="FulltextIndex" id="FulltextIndex">Creating and utilizing a Full-text index</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>When there is a full-text index on the field that is being searched, rather than scanning all records, AsterixDB can utilize that index to expedite the execution of a FTS query. To create a full-text index, you need to specify the index type as <tt>fulltext</tt> in your DDL statement. For instance, the following DDL statement create a full-text index on the TweetMessages.message-text attribute.</p>
-
-<div>
-<div>
-<pre class="source">create index messageFTSIdx on TweetMessages(message-text) type fulltext;
-</pre></div></div></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/js-sdk.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/js-sdk.html b/docs/0.9.4/aql/js-sdk.html
index 50700e9..c5902e4 100644
--- a/docs/0.9.4/aql/js-sdk.html
+++ b/docs/0.9.4/aql/js-sdk.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/js-sdk.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/js-sdk.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB Javascript SDK</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/manual.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/manual.html b/docs/0.9.4/aql/manual.html
index 7a45391..ce8e842 100644
--- a/docs/0.9.4/aql/manual.html
+++ b/docs/0.9.4/aql/manual.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/manual.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/manual.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; The Asterix Query Language, Version 1.0</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li class="active"><a href="#"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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 class="active"><a href="#"><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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/primer.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/primer.html b/docs/0.9.4/aql/primer.html
index 46918a7..36d59dd 100644
--- a/docs/0.9.4/aql/primer.html
+++ b/docs/0.9.4/aql/primer.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/primer.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/primer.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB 101: An ADM and AQL Primer</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="../index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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 class="active"><a href="#"><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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aql/similarity.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aql/similarity.html b/docs/0.9.4/aql/similarity.html
deleted file mode 100644
index ff71fcf..0000000
--- a/docs/0.9.4/aql/similarity.html
+++ /dev/null
@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/aql/similarity.md at 2018-10-02
- | 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="20181002" />
-    <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; AsterixDB  Support of Similarity Queries</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-02</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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</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 - SQL++</li>
-    <li><a href="../sqlpp/manual.html" title="The SQL++ Query Language"><span class="none"></span>The SQL++ Query Language</a></li>
-    <li><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
-    <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
-    <li><a href="../udf.html" title="User Defined Functions"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li class="active"><a href="#"><span class="none"></span>Support of Similarity Queries</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>AsterixDB  Support of Similarity Queries</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="#Motivation">Motivation</a></li>
-<li><a href="#DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a></li>
-<li><a href="#SimilaritySelectionQueries">Similarity Selection Queries</a></li>
-<li><a href="#SimilarityJoinQueries">Similarity Join Queries</a></li>
-<li><a href="#UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a></li>
-</ul></div>
-<div class="section">
-<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>Similarity queries are widely used in applications where users need to find objects that satisfy a similarity predicate, while exact matching is not sufficient. These queries are especially important for social and Web applications, where errors, abbreviations, and inconsistencies are common.  As an example, we may want to find all the movies starring Schwarzenegger, while we don&#x2019;t know the exact spelling of his last name (despite his popularity in both the movie industry and politics :-)). As another example, we want to find all the Facebook users who have similar friends. To meet this type of needs, AsterixDB supports similarity queries using efficient indexes and algorithms.</p></div>
-<div class="section">
-<h2><a name="Data_Types_and_Similarity_Functions_.5BBack_to_TOC.5D"></a><a name="DataTypesAndSimilarityFunctions" id="DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>AsterixDB supports <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> (on strings) and <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a> (on sets).  For instance, in our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, the <tt>friend-ids</tt> of a Facebook user forms a set of friends, and we can define a similarity between the sets of friends of two users. We can also convert a string to a set of grams of a length &#x201c;n&#x201d; (called &#x201c;n-grams&#x201d;) and define the Jaccard similarity between the two gram sets of the two strings. Formally, the &#x201c;n-grams&#x201d; of a string are its substrings of length &#x201c;n&#x201d;. For instance, the 3-grams of the string <tt>schwarzenegger</tt> are <tt>sch</tt>, <tt>chw</tt>, <tt>hwa</tt>, &#x2026;, <tt>ger</tt>.</p>
-<p>AsterixDB provides <a href="functions.html#Tokenizing_Functions">tokenization functions</a> to convert strings to sets, and the <a href="functions.html#Similarity_Functions">similarity functions</a>.</p></div>
-<div class="section">
-<h2><a name="Similarity_Selection_Queries_.5BBack_to_TOC.5D"></a><a name="SimilaritySelectionQueries" id="SimilaritySelectionQueries">Similarity Selection Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>The following query asks for all the Facebook users whose name is similar to <tt>Suzanna Tilson</tt>, i.e., their edit distance is at most 2.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
-    where $ed &lt;= 2
-    return $user
-</pre></div></div>
-
-<p>The following query asks for all the Facebook users whose set of friend ids is similar to <tt>[1,5,9,10]</tt>, i.e., their Jaccard similarity is at least 0.6.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
-    where $sim &gt;= 0.6f
-    return $user
-</pre></div></div>
-
-<p>AsterixDB allows a user to use a similarity operator <tt>~=</tt> to express a condition by defining the similarity function and threshold using &#x201c;set&#x201d; statements earlier. For instance, the above query can be equivalently written as:</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    set simfunction &quot;jaccard&quot;;
-    set simthreshold &quot;0.6f&quot;;
-
-    for $user in dataset('FacebookUsers')
-    where $user.friend-ids ~= [1,5,9,10]
-    return $user
-</pre></div></div>
-
-<p>In this query, we first declare Jaccard as the similarity function using <tt>simfunction</tt> and then specify the threshold <tt>0.6f</tt> using <tt>simthreshold</tt>.</p></div>
-<div class="section">
-<h2><a name="Similarity_Join_Queries_.5BBack_to_TOC.5D"></a><a name="SimilarityJoinQueries" id="SimilarityJoinQueries">Similarity Join Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>AsterixDB supports fuzzy joins between two sets. The following <a href="primer.html#Query_5_-_Fuzzy_Join">query</a> finds, for each Facebook user, all Twitter users with names similar to their name based on the edit distance.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    set simfunction &quot;edit-distance&quot;;
-    set simthreshold &quot;3&quot;;
-
-    for $fbu in dataset FacebookUsers
-    return {
-        &quot;id&quot;: $fbu.id,
-        &quot;name&quot;: $fbu.name,
-        &quot;similar-users&quot;: for $t in dataset TweetMessages
-                            let $tu := $t.user
-                            where $tu.name ~= $fbu.name
-                            return {
-                            &quot;twitter-screenname&quot;: $tu.screen-name,
-                            &quot;twitter-name&quot;: $tu.name
-                            }
-    };
-</pre></div></div>
-</div>
-<div class="section">
-<h2><a name="Using_Indexes_to_Support_Similarity_Queries_.5BBack_to_TOC.5D"></a><a name="UsingIndexesToSupportSimilarityQueries" id="UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
-<p>AsterixDB uses two types of indexes to support similarity queries, namely &#x201c;ngram index&#x201d; and &#x201c;keyword index&#x201d;.</p>
-<div class="section">
-<h3><a name="NGram_Index"></a>NGram Index</h3>
-<p>An &#x201c;ngram index&#x201d; is constructed on a set of strings.  We generate n-grams for each string, and build an inverted list for each n-gram that includes the ids of the strings with this gram.  A similarity query can be answered efficiently by accessing the inverted lists of the grams in the query and counting the number of occurrences of the string ids on these inverted lists.  The similar idea can be used to answer queries with Jaccard similarity.  A detailed description of these techniques is available at this <a class="externalLink" href="http://www.ics.uci.edu/~chenli/pub/icde2009-memreducer.pdf">paper</a>.</p>
-<p>For instance, the following DDL statements create an ngram index on the <tt>FacebookUsers.name</tt> attribute using an inverted index of 3-grams.</p>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    create index fbUserIdx on FacebookUsers(name) type ngram(3);
-</pre></div></div>
-
-<p>The number &#x201c;3&#x201d; in &#x201c;ngram(3)&#x201d; is the length &#x201c;n&#x201d; in the grams. This index can be used to optimize similarity queries on this attribute using <a href="functions.html#edit-distance">edit-distance</a>, <a href="functions.html#edit-distance-check">edit-distance-check</a>, <a href="functions.html#similarity-jaccard">similarity-jaccard</a>, or <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a> queries on this attribute where the similarity is defined on sets of 3-grams.  This index can also be used to optimize queries with the &#x201c;<a href="(functions.html#contains">contains()</a>&#x201d; predicate (i.e., substring matching) since it can be also be solved by counting on the inverted lists of the grams in the query string.</p>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_edit-distance"></a>NGram Index usage case - <a href="functions.html#edit-distance">edit-distance</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
-    where $ed &lt;= 2
-    return $user
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_edit-distance-check"></a>NGram Index usage case - <a href="functions.html#edit-distance-check">edit-distance-check</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
-    where $ed[0]
-    return $ed[1]
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_similarity-jaccard"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard">similarity-jaccard</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
-    where $sim &gt;= 0.6f
-    return $user
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_similarity-jaccard-check"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $user in dataset('FacebookUsers')
-    let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
-    where $sim[0]
-    return $user
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="NGram_Index_usage_case_-_contains.28.29"></a>NGram Index usage case - <a href="(functions.html#contains">contains()</a></h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    for $i in dataset('FacebookMessages')
-    where contains($i.message, &quot;phone&quot;)
-    return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
-</pre></div></div>
-</div></div>
-<div class="section">
-<h3><a name="Keyword_Index"></a>Keyword Index</h3>
-<p>A &#x201c;keyword index&#x201d; is constructed on a set of strings or sets (e.g., OrderedList, UnorderedList). Instead of generating grams as in an ngram index, we generate tokens (e.g., words) and for each token, construct an inverted list that includes the ids of the objects with this token.  The following two examples show how to create keyword index on two different types:</p>
-<div class="section">
-<h4><a name="Keyword_Index_on_String_Type"></a>Keyword Index on String Type</h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    drop index FacebookMessages.fbMessageIdx if exists;
-    create index fbMessageIdx on FacebookMessages(message) type keyword;
-
-    for $o in dataset('FacebookMessages')
-    let $jacc := similarity-jaccard-check(word-tokens($o.message), word-tokens(&quot;love like ccast&quot;), 0.2f)
-    where $jacc[0]
-    return $o
-</pre></div></div>
-</div>
-<div class="section">
-<h4><a name="Keyword_Index_on_UnorderedList_Type"></a>Keyword Index on UnorderedList Type</h4>
-
-<div>
-<div>
-<pre class="source">    use dataverse TinySocial;
-
-    create index fbUserIdx_fids on FacebookUsers(friend-ids) type keyword;
-
-    for $c in dataset('FacebookUsers')
-    let $jacc := similarity-jaccard-check($c.friend-ids, {{3,10}}, 0.5f)
-    where $jacc[0]
-    return $c
-</pre></div></div>
-
-<p>As shown above, keyword index can be used to optimize queries with token-based similarity predicates, including <a href="functions.html#similarity-jaccard">similarity-jaccard</a> and <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a>.</p></div></div></div>
-        </div>
-      </div>
-    </div>
-    <hr/>
-    <footer>
-      <div class="container-fluid">
-        <div class="row-fluid">
-<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
-        feather logo, and the Apache AsterixDB project logo are either
-        registered trademarks or trademarks of The Apache Software
-        Foundation in the United States and other countries.
-        All other marks mentioned may be trademarks or registered
-        trademarks of their respective owners.
-      </div>
-        </div>
-      </div>
-    </footer>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/aws.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/aws.html b/docs/0.9.4/aws.html
new file mode 100644
index 0000000..977e782
--- /dev/null
+++ b/docs/0.9.4/aws.html
@@ -0,0 +1,384 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/aws.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; Installation using Amazon Web Services</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 class="active"><a href="#"><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><a href="sqlpp/builtins.html" title="Builtin Functions"><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>Installation using Amazon Web Services</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+<ul>
+
+<li><a href="#Introduction">Introduction</a></li>
+<li><a href="#Prerequisites">Prerequisites</a></li>
+<li><a href="#config">Cluster Configuration</a></li>
+<li><a href="#lifecycle">Cluster Lifecycle Management</a></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">
+<h2><a name="Introduction" id="Introduction">Introduction</a></h2>
+<p>Note that you can always manually launch a number of Amazon Web Services EC2 instances and then run the Ansible cluster installation scripts as described <a href="ansible.html">here</a> separately to manage the lifecycle of an AsterixDB cluster on those EC2 instances.</p>
+<p>However, via this installation option, we provide a combo solution for automating both AWS EC2 and AsterixDB, where you can run only one script to deploy, start, stop, and terminate an AsterixDB cluster on AWS.</p></div>
+<div class="section">
+<h2><a name="Prerequisites" id="Prerequisites">Prerequisites</a></h2>
+<ul>
+
+<li>
+
+<p>Supported operating systems for the client: <b>Linux</b> and <b>MacOS</b></p>
+</li>
+<li>
+
+<p>Supported operating systems for Amazon Web Services instances: <b>Linux</b></p>
+</li>
+<li>
+
+<p>Install pip on your client machine:</p>
+<p>CentOS</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo yum install python-pip
+</pre></div></div>
+
+<p>Ubuntu</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo apt-get install python-pip
+</pre></div></div>
+
+<p>macOS</p>
+
+<div>
+<div>
+<pre class="source"> $ brew install pip
+</pre></div></div>
+</li>
+<li>
+
+<p>Install Ansible, boto, and boto3 on your client machine:</p>
+
+<div>
+<div>
+<pre class="source"> $ pip install ansible
+ $ pip install boto
+ $ pip install boto3
+</pre></div></div>
+
+<p>Note that you might need <tt>sudo</tt> depending on your system configuration.</p>
+<p><b>Make sure that the version of Ansible is no less than 2.2.1.0</b>:</p>
+
+<div>
+<div>
+<pre class="source"> $ ansible --version
+ ansible 2.2.1.0
+</pre></div></div>
+
+<p><b>For users with macOS 10.11+</b>, please create a user-level Ansible configuration file at:</p>
+
+<div>
+<div>
+<pre class="source"> ~/.ansible.cfg
+</pre></div></div>
+
+<p>and add the following configuration:</p>
+
+<div>
+<div>
+<pre class="source"> [ssh_connection]
+ control_path = %(directory)s/%%C
+</pre></div></div>
+</li>
+<li>
+
+<p>Download the AsterixDB distribution package, unzip it, navigate to <tt>opt/aws/</tt></p>
+
+<div>
+<div>
+<pre class="source"> $ cd opt/aws
+</pre></div></div>
+
+<p>The following files and directories are in the directory <tt>opt/aws</tt>:</p>
+
+<div>
+<div>
+<pre class="source"> README  bin  conf  yaml
+</pre></div></div>
+
+<p><tt>bin</tt> contains scripts that start and terminate an AWS-based cluster instance, according to the configuration specified in files under <tt>conf</tt>, and <tt>yaml</tt> contains internal Ansible scripts that the shell scripts in <tt>bin</tt> use.</p>
+</li>
+<li>
+
+<p>Create an AWS account and an IAM user.</p>
+<p>Set up a security group that you&#x2019;d like to use for your AWS cluster. <b>The security group should at least allow all TCP connections from anywhere.</b> Provide the name of the security group as the value for the <tt>group</tt> field in <tt>conf/aws_settings.yml</tt>.</p>
+</li>
+<li>
+
+<p>Retrieve your AWS EC2 key pair name and use that as the <tt>keypair</tt> in <tt>conf/aws_settings.yml</tt>;</p>
+<p>retrieve your AWS IAM <tt>access key ID</tt> and use that as the <tt>access_key_id</tt> in <tt>conf/aws_settings.yml</tt>;</p>
+<p>retrieve your AWS IAM <tt>secret access key</tt> and use that as the <tt>secret_access_key</tt> in <tt>conf/aws_settings.yml</tt>.</p>
+<p>Note that you can only read or download <tt>access key ID</tt> and <tt>secret access key</tt> once from your AWS console. If you forget them, you have to create new keys and delete the old ones.</p>
+</li>
+<li>
+
+<p>Configure your ssh setting by editing <tt>~/.ssh/config</tt> and adding the following entry:</p>
+
+<div>
+<div>
+<pre class="source"> Host *.amazonaws.com
+      IdentityFile &lt;path_of_private_key&gt;
+</pre></div></div>
+
+<p>Note that &lt;path_of_private_key&gt; should be replaced by the path to the file that stores the private key for the key pair that you uploaded to AWS and used in <tt>conf/aws_settings</tt>. For example:</p>
+
+<div>
+<div>
+<pre class="source"> Host *.amazonaws.com
+      IdentityFile ~/.ssh/id_rsa
+</pre></div></div>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Configuration"></a><a name="config" id="config">Cluster Configuration</a></h2>
+<ul>
+
+<li>
+
+<p><b>AWS settings</b>.  Edit <tt>conf/instance_settings.yml</tt>. The meaning of each parameter is listed as follows:</p>
+
+<div>
+<div>
+<pre class="source"> # The OS image id for ec2 instances.
+ image: ami-76fa4116
+
+ # The data center region for ec2 instances.
+ region: us-west-2
+
+ # The tag for each ec2 machine. Use different tags for isolation.
+ tag: scale_test
+
+ # The name of a security group that appears in your AWS console.
+ group: default
+
+ # The name of a key pair that appears in your AWS console.
+ keypair: &lt;to be filled&gt;
+
+ # The AWS access key id for your IAM user.
+ access_key_id: &lt;to be filled&gt;
+
+ # The AWS secret key for your IAM user.
+ secret_access_key: &lt;to be filled&gt;
+
+ # The AWS instance type. A full list of available types are listed at:
+ # https://aws.amazon.com/ec2/instance-types/
+ instance_type: t2.micro
+
+ # The number of ec2 instances that construct a cluster.
+ count: 3
+
+ # The user name.
+ user: ec2-user
+
+ # Whether to reuse one slave machine to host the master process.
+ cc_on_nc: false
+</pre></div></div>
+
+<p><b>As described in <a href="#Prerequisites">prerequisites</a>, the following parameters must be customized:</b></p>
+
+<div>
+<div>
+<pre class="source"> # The tag for each ec2 machine. Use different tags for isolation.
+ tag: scale_test
+
+ # The name of a security group that appears in your AWS console.
+ group: default
+
+ # The name of a key pair that appears in your AWS console.
+ keypair: &lt;to be filled&gt;
+
+ # The AWS access key id for your IAM user.
+ access_key_id: &lt;to be filled&gt;
+
+ # The AWS secrety key for your IAM user.
+ secret_access_key: &lt;to be filled&gt;
+</pre></div></div>
+</li>
+<li>
+
+<p><b>Remote working directories</b>. Edit <tt>conf/instance_settings.yml</tt> to change the remote binary directory (the variable &#x201c;binarydir&#x201d;) when necessary. By default, the binary directory will be under the home directory (as the value of Ansible builtin variable ansible_env.HOME) of the ssh user account on each node.</p>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Lifecycle_Management"></a><a name="lifecycle" id="lifecycle">Cluster Lifecycle Management</a></h2>
+<ul>
+
+<li>
+
+<p>Allocate AWS EC2 nodes (the number of nodes is specified in <tt>conf/instance_settings.yml</tt>) and deploy the binary to all allocated EC2 nodes:</p>
+
+<div>
+<div>
+<pre class="source"> bin/deploy.sh
+</pre></div></div>
+</li>
+<li>
+
+<p>Before starting the AsterixDB cluster, you the instance configuration file <tt>conf/instance/cc.conf</tt> can be modified with the exception of the IP addresses/DNS names which are are generated and cannot be changed. All available parameters and their usage can be found <a href="ncservice.html#Parameters">here</a>.</p>
+</li>
+<li>
+
+<p>Launch your AsterixDB cluster on EC2:</p>
+
+<div>
+<div>
+<pre class="source"> bin/start.sh
+</pre></div></div>
+
+<p>Now you can use the multi-node AsterixDB cluster on EC2 by by opening the master node listed in <tt>conf/instance/inventory</tt> at port <tt>19001</tt> (which can be customized in <tt>conf/instance/cc.conf</tt>) in your browser.</p>
+</li>
+<li>
+
+<p>If you want to stop the AWS-based AsterixDB cluster, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> bin/stop.sh
+</pre></div></div>
+
+<p>Note that this only stops AsterixDB but does not stop the EC2 nodes.</p>
+</li>
+<li>
+
+<p>If you want to terminate the EC2 nodes that run the AsterixDB cluster, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> bin/terminate.sh
+</pre></div></div>
+
+<p><b>Note that it will destroy everything in the AsterixDB cluster you installed and terminate all EC2 nodes for the cluster.</b></p>
+</li>
+</ul></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>


[09/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/sqlpp/primer-sqlpp.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/sqlpp/primer-sqlpp.html b/content/docs/0.9.4/sqlpp/primer-sqlpp.html
index d0f6ca5..1a935a1 100644
--- a/content/docs/0.9.4/sqlpp/primer-sqlpp.html
+++ b/content/docs/0.9.4/sqlpp/primer-sqlpp.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/primer-sqlpp.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/primer-sqlpp.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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181012" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB 101: An ADM and SQL++ Primer</title>
     <link rel="stylesheet" href="../css/apache-maven-fluido-1.7.min.css" />
@@ -26,7 +26,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
+        <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>
@@ -40,26 +40,26 @@
     <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 class="active"><a href="#"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="../aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></li>
+    <li class="active"><a href="#"><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 - SQL++</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="../aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="../aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="../aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="../feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="../aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="../aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/sqlpp/similarity.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/sqlpp/similarity.html b/content/docs/0.9.4/sqlpp/similarity.html
new file mode 100644
index 0000000..6f100ae
--- /dev/null
+++ b/content/docs/0.9.4/sqlpp/similarity.html
@@ -0,0 +1,310 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/sqlpp/similarity.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; AsterixDB  Support of Similarity Queries</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><a href="../sqlpp/builtins.html" title="Builtin Functions"><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 class="active"><a href="#"><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>AsterixDB  Support of Similarity Queries</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="#Motivation">Motivation</a></li>
+<li><a href="#DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a></li>
+<li><a href="#SimilaritySelectionQueries">Similarity Selection Queries</a></li>
+<li><a href="#SimilarityJoinQueries">Similarity Join Queries</a></li>
+<li><a href="#UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="Motivation_.5BBack_to_TOC.5D"></a><a name="Motivation" id="Motivation">Motivation</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Similarity queries are widely used in applications where users need to find objects that satisfy a similarity predicate, while exact matching is not sufficient. These queries are especially important for social and Web applications, where errors, abbreviations, and inconsistencies are common.  As an example, we may want to find all the movies starring Schwarzenegger, while we don&#x2019;t know the exact spelling of his last name (despite his popularity in both the movie industry and politics :-)). As another example, we want to find all the Facebook users who have similar friends. To meet this type of needs, AsterixDB supports similarity queries using efficient indexes and algorithms.</p></div>
+<div class="section">
+<h2><a name="Data_Types_and_Similarity_Functions_.5BBack_to_TOC.5D"></a><a name="DataTypesAndSimilarityFunctions" id="DataTypesAndSimilarityFunctions">Data Types and Similarity Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports <a class="externalLink" href="http://en.wikipedia.org/wiki/Levenshtein_distance">edit distance</a> (on strings) and <a class="externalLink" href="http://en.wikipedia.org/wiki/Jaccard_index">Jaccard</a> (on sets).  For instance, in our <a href="primer.html#ADM:_Modeling_Semistructed_Data_in_AsterixDB">TinySocial</a> example, the <tt>friend-ids</tt> of a Facebook user forms a set of friends, and we can define a similarity between the sets of friends of two users. We can also convert a string to a set of grams of a length &#x201c;n&#x201d; (called &#x201c;n-grams&#x201d;) and define the Jaccard similarity between the two gram sets of the two strings. Formally, the &#x201c;n-grams&#x201d; of a string are its substrings of length &#x201c;n&#x201d;. For instance, the 3-grams of the string <tt>schwarzenegger</tt> are <tt>sch</tt>, <tt>chw</tt>, <tt>hwa</tt>, &#x2026;, <tt>ger</tt>.</p>
+<p>AsterixDB provides <a href="functions.html#Tokenizing_Functions">tokenization functions</a> to convert strings to sets, and the <a href="functions.html#Similarity_Functions">similarity functions</a>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Selection_Queries_.5BBack_to_TOC.5D"></a><a name="SimilaritySelectionQueries" id="SimilaritySelectionQueries">Similarity Selection Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>The following query asks for all the Facebook users whose name is similar to <tt>Suzanna Tilson</tt>, i.e., their edit distance is at most 2.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div>
+
+<p>The following query asks for all the Facebook users whose set of friend ids is similar to <tt>[1,5,9,10]</tt>, i.e., their Jaccard similarity is at least 0.6.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div>
+
+<p>AsterixDB allows a user to use a similarity operator <tt>~=</tt> to express a condition by defining the similarity function and threshold using &#x201c;set&#x201d; statements earlier. For instance, the above query can be equivalently written as:</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    set simfunction &quot;jaccard&quot;;
+    set simthreshold &quot;0.6f&quot;;
+
+    for $user in dataset('FacebookUsers')
+    where $user.friend-ids ~= [1,5,9,10]
+    return $user
+</pre></div></div>
+
+<p>In this query, we first declare Jaccard as the similarity function using <tt>simfunction</tt> and then specify the threshold <tt>0.6f</tt> using <tt>simthreshold</tt>.</p></div>
+<div class="section">
+<h2><a name="Similarity_Join_Queries_.5BBack_to_TOC.5D"></a><a name="SimilarityJoinQueries" id="SimilarityJoinQueries">Similarity Join Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports fuzzy joins between two sets. The following <a href="primer.html#Query_5_-_Fuzzy_Join">query</a> finds, for each Facebook user, all Twitter users with names similar to their name based on the edit distance.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    set simfunction &quot;edit-distance&quot;;
+    set simthreshold &quot;3&quot;;
+
+    for $fbu in dataset FacebookUsers
+    return {
+        &quot;id&quot;: $fbu.id,
+        &quot;name&quot;: $fbu.name,
+        &quot;similar-users&quot;: for $t in dataset TweetMessages
+                            let $tu := $t.user
+                            where $tu.name ~= $fbu.name
+                            return {
+                            &quot;twitter-screenname&quot;: $tu.screen-name,
+                            &quot;twitter-name&quot;: $tu.name
+                            }
+    };
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="Using_Indexes_to_Support_Similarity_Queries_.5BBack_to_TOC.5D"></a><a name="UsingIndexesToSupportSimilarityQueries" id="UsingIndexesToSupportSimilarityQueries">Using Indexes to Support Similarity Queries</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB uses two types of indexes to support similarity queries, namely &#x201c;ngram index&#x201d; and &#x201c;keyword index&#x201d;.</p>
+<div class="section">
+<h3><a name="NGram_Index"></a>NGram Index</h3>
+<p>An &#x201c;ngram index&#x201d; is constructed on a set of strings.  We generate n-grams for each string, and build an inverted list for each n-gram that includes the ids of the strings with this gram.  A similarity query can be answered efficiently by accessing the inverted lists of the grams in the query and counting the number of occurrences of the string ids on these inverted lists.  The similar idea can be used to answer queries with Jaccard similarity.  A detailed description of these techniques is available at this <a class="externalLink" href="http://www.ics.uci.edu/~chenli/pub/icde2009-memreducer.pdf">paper</a>.</p>
+<p>For instance, the following DDL statements create an ngram index on the <tt>FacebookUsers.name</tt> attribute using an inverted index of 3-grams.</p>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    create index fbUserIdx on FacebookUsers(name) type ngram(3);
+</pre></div></div>
+
+<p>The number &#x201c;3&#x201d; in &#x201c;ngram(3)&#x201d; is the length &#x201c;n&#x201d; in the grams. This index can be used to optimize similarity queries on this attribute using <a href="functions.html#edit-distance">edit-distance</a>, <a href="functions.html#edit-distance-check">edit-distance-check</a>, <a href="functions.html#similarity-jaccard">similarity-jaccard</a>, or <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a> queries on this attribute where the similarity is defined on sets of 3-grams.  This index can also be used to optimize queries with the &#x201c;<a href="(functions.html#contains">contains()</a>&#x201d; predicate (i.e., substring matching) since it can be also be solved by counting on the inverted lists of the grams in the query string.</p>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance"></a>NGram Index usage case - <a href="functions.html#edit-distance">edit-distance</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance($user.name, &quot;Suzanna Tilson&quot;)
+    where $ed &lt;= 2
+    return $user
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_edit-distance-check"></a>NGram Index usage case - <a href="functions.html#edit-distance-check">edit-distance-check</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $ed := edit-distance-check($user.name, &quot;Suzanna Tilson&quot;, 2)
+    where $ed[0]
+    return $ed[1]
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard">similarity-jaccard</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard($user.friend-ids, [1,5,9,10])
+    where $sim &gt;= 0.6f
+    return $user
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_similarity-jaccard-check"></a>NGram Index usage case - <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $user in dataset('FacebookUsers')
+    let $sim := similarity-jaccard-check($user.friend-ids, [1,5,9,10], 0.6f)
+    where $sim[0]
+    return $user
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="NGram_Index_usage_case_-_contains.28.29"></a>NGram Index usage case - <a href="(functions.html#contains">contains()</a></h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    for $i in dataset('FacebookMessages')
+    where contains($i.message, &quot;phone&quot;)
+    return {&quot;mid&quot;: $i.message-id, &quot;message&quot;: $i.message}
+</pre></div></div>
+</div></div>
+<div class="section">
+<h3><a name="Keyword_Index"></a>Keyword Index</h3>
+<p>A &#x201c;keyword index&#x201d; is constructed on a set of strings or sets (e.g., OrderedList, UnorderedList). Instead of generating grams as in an ngram index, we generate tokens (e.g., words) and for each token, construct an inverted list that includes the ids of the objects with this token.  The following two examples show how to create keyword index on two different types:</p>
+<div class="section">
+<h4><a name="Keyword_Index_on_String_Type"></a>Keyword Index on String Type</h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    drop index FacebookMessages.fbMessageIdx if exists;
+    create index fbMessageIdx on FacebookMessages(message) type keyword;
+
+    for $o in dataset('FacebookMessages')
+    let $jacc := similarity-jaccard-check(word-tokens($o.message), word-tokens(&quot;love like ccast&quot;), 0.2f)
+    where $jacc[0]
+    return $o
+</pre></div></div>
+</div>
+<div class="section">
+<h4><a name="Keyword_Index_on_UnorderedList_Type"></a>Keyword Index on UnorderedList Type</h4>
+
+<div>
+<div>
+<pre class="source">    use dataverse TinySocial;
+
+    create index fbUserIdx_fids on FacebookUsers(friend-ids) type keyword;
+
+    for $c in dataset('FacebookUsers')
+    let $jacc := similarity-jaccard-check($c.friend-ids, {{3,10}}, 0.5f)
+    where $jacc[0]
+    return $c
+</pre></div></div>
+
+<p>As shown above, keyword index can be used to optimize queries with token-based similarity predicates, including <a href="functions.html#similarity-jaccard">similarity-jaccard</a> and <a href="functions.html#similarity-jaccard-check">similarity-jaccard-check</a>.</p></div></div></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/content/docs/0.9.4/udf.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.4/udf.html b/content/docs/0.9.4/udf.html
index 83f7114..65bc7bb 100644
--- a/content/docs/0.9.4/udf.html
+++ b/content/docs/0.9.4/udf.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/udf.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/udf.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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181012" />
     <meta http-equiv="Content-Language" content="en" />
-    <title>AsterixDB &#x2013; Support for User Defined Functions in AsterixDB</title>
+    <title>AsterixDB &#x2013; User-defined 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" />
@@ -26,7 +26,7 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
+        <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>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</a></li>
+    <li><a href="feeds.html" title="Data Ingestion with Feeds"><span class="none"></span>Data Ingestion with Feeds</a></li>
     <li class="active"><a href="#"><span class="none"></span>User Defined Functions</a></li>
-    <li><a href="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">
@@ -90,160 +90,173 @@
  ! specific language governing permissions and limitations
  ! under the License.
  !-->
-<h1>Support for User Defined Functions in AsterixDB</h1>
+<h1>User-defined Functions</h1>
 <div class="section">
 <h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
 <ul>
 
-<li><a href="#PreprocessingCollectedData">Using UDF to preprocess feed-collected data</a></li>
-<li><a href="#WritingAnExternalUDF">Writing an External UDF</a></li>
-<li><a href="#CreatingAnAsterixDBLibrary">Creating an AsterixDB Library</a></li>
-<li><a href="#installingUDF">Installing an AsterixDB Library</a></li>
-</ul>
-<p>In this document, we describe the support for implementing, using, and installing user-defined functions (UDF) in AsterixDB. We will explain how we can use UDFs to preprocess, e.g., data collected using feeds (see the <a href="feeds/tutorial.html">feeds tutorial</a>).</p>
+<li><a href="#introduction">Introduction</a></li>
+<li><a href="#installingUDF">Installing an UDF Library</a></li>
+<li><a href="#UDFOnFeeds">Attaching an UDF on Data Feeds</a></li>
+<li><a href="#udfConfiguration">A quick look of the UDF configuration</a></li>
+<li><a href="#uninstall">Unstalling an UDF Library</a><!--
+! 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.
+!--></li>
+</ul></div>
+<div class="section">
+<h2><a name="Introduction"></a><a name="introduction">Introduction</a></h2>
+<p>Apache AsterixDB supports two languages for writing user-defined functions (UDFs): SQL++ and Java. A user can encapsulate data processing logic into a UDF and invoke it later repeatedly. For SQL++ functions, a user can refer to <a href="sqlpp/manual.html#Functions">SQL++ Functions</a> for their usages. In this document, we focus on how to install/invoke/uninstall a Java function library using the Ansible script that we provide.</p></div>
 <div class="section">
-<h3><a name="Installing_an_AsterixDB_Library"></a><a name="installingUDF">Installing an AsterixDB Library</a></h3>
-<p>We assume you have followed the <a href="../install.html">installation instructions</a> to set up a running AsterixDB instance. Let us refer your AsterixDB instance by the name &#x201c;my_asterix&#x201d;.</p>
+<h2><a name="Installing_an_UDF_Library"></a><a name="installingUDF">Installing an UDF Library</a></h2>
+<p>UDFs have to be installed offline. This section describes the process assuming that you have followed the preceding <a href="ansible.html">ansible installation instructions</a> to deploy an AsterixDB instance on your local machine or cluster. Here are the instructions to install an UDF library:</p>
 <ul>
 
 <li>
 
-<p>Step 1: Stop the AsterixDB instance if it is in the ACTIVE state.</p>
+<p>Step 1: Stop the AsterixDB instance if it is ACTIVE.</p>
 
 <div>
 <div>
-<pre class="source">$ managix stop -n my_asterix
+<pre class="source">$ bin/stop.sh
 </pre></div></div>
 </li>
 <li>
 
-<p>Step 2: Install the library using Managix install command. Just to illustrate, we use the help command to look up the syntax</p>
+<p>Step 2: Deploy the UDF package.</p>
 
 <div>
 <div>
-<pre class="source">$ managix help  -cmd install
-Installs a library to an asterix instance.
-Options
-n  Name of Asterix Instance
-d  Name of the dataverse under which the library will be installed
-l  Name of the library
-p  Path to library zip bundle
+<pre class="source">$ bin/udf.sh -m i -d DATAVERSE_NAME -l LIBRARY_NAME -p UDF_PACKAGE_PATH
 </pre></div></div>
 </li>
-</ul>
-<p>Above is a sample output and explains the usage and the required parameters. Each library has a name and is installed under a dataverse. Recall that we had created a dataverse by the name - &#x201c;feeds&#x201d; prior to  creating our datatypes and dataset. We shall name our library - &#x201c;testlib&#x201d;.</p>
-<p>We assume you have a library zip bundle that needs to be installed. To install the library, use the Managix install command. An example is shown below.</p>
+<li>
+
+<p>Step 3: Start AsterixDB</p>
 
 <div>
 <div>
-<pre class="source">    $ managix install -n my_asterix -d feeds -l testlib -p extlibs/asterix-external-data-0.8.7-binary-assembly.zip
+<pre class="source">$ bin/start.sh
 </pre></div></div>
-
-<p>You should see the following message:</p>
+</li>
+</ul>
+<p>After AsterixDB starts, you can use the following query to check whether your UDFs have been sucessfully registered with the system.</p>
 
 <div>
 <div>
-<pre class="source">    INFO: Installed library testlib
+<pre class="source">    SELECT * FROM Metadata.`Function`;
 </pre></div></div>
 
-<p>We shall next start our AsterixDB instance using the start command as shown below.</p>
+<p>In the AsterixDB source release, we provide several sample UDFs that you can try out. You need to build the AsterixDB source to get the compiled UDF package. It can be found under the <tt>asterixdb-external</tt> sub-project. Assuming that these UDFs have been installed into the <tt>udfs</tt> dataverse and <tt>testlib</tt> library, here is an example that uses the sample UDF <tt>mysum</tt> to compute the sum of two input integers.</p>
 
 <div>
 <div>
-<pre class="source">    $ managix start -n my_asterix
-</pre></div></div>
+<pre class="source">    use udfs;
 
-<p>You may now use the AsterixDB library in AQL statements and queries. To look at the installed artifacts, you may execute the following query at the AsterixDB web-console.</p>
+    testlib#mysum(3,4);
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="Attaching_a_UDF_on_Data_Feeds"></a><a name="UDFOnFeeds" id="UDFOnFeeds">Attaching a UDF on Data Feeds</a></h2>
+<p>In <a href="feeds.html">Data Ingestion using feeds</a>, we introduced an efficient way for users to get data into AsterixDB. In some use cases, users may want to pre-process the incoming data before storing it into the dataset. To meet this need, AsterixDB allows the user to attach a UDF onto the ingestion pipeline. Following the example in <a href="feeds.html">Data Ingestion</a>, here we show an example of how to attach a UDF that extracts the user names mentioned from the incoming Tweet text, storing the processed Tweets into a dataset.</p>
+<p>We start by creating the datatype and dataset that will be used for the feed and UDF. One thing to keep in mind is that data flows from the feed to the UDF and then to the dataset. This means that the feed&#x2019;s datatype should be the same as the input type of the UDF, and the output datatype of the UDF should be the same as the dataset&#x2019;s datatype. Thus, users should make sure that their datatypes are consistent in the UDF configuration. Users can also take advantage of open datatypes in AsterixDB by creating a minimum description of the data for simplicity. Here we use open datatypes:</p>
 
 <div>
 <div>
-<pre class="source">    for $x in dataset Metadata.Function
-    return $x
+<pre class="source">    use udfs;
+
+    create type TweetType if not exists as open {
+        id: int64
+    };
 
-    for $x in dataset Metadata.Library
-    return $x
+    create dataset ProcessedTweets(TweetType) primary key id;
 </pre></div></div>
 
-<p>Our library is now installed and is ready to be used.</p></div></div>
-<div class="section">
-<h2><a name="Preprocessing_Collected_Data"></a><a name="PreprocessingCollectedData" id="PreprocessingCollectedData">Preprocessing Collected Data</a></h2>
-<p>In the following we assume that you already created the <tt>TwitterFeed</tt> and its corresponding data types and dataset following the instruction explained in the <a href="feeds/tutorial.html">feeds tutorial</a>.</p>
-<p>A feed definition may optionally include the specification of a user-defined function that is to be applied to each feed object prior to persistence. Examples of pre-processing might include adding attributes, filtering out objects, sampling, sentiment analysis, feature extraction, etc. We can express a UDF, which can be defined in AQL or in a programming language such as Java, to perform such pre-processing. An AQL UDF is a good fit when pre-processing a object requires the result of a query (join or aggregate) over data contained in AsterixDB datasets. More sophisticated processing such as sentiment analysis of text is better handled by providing a Java UDF. A Java UDF has an initialization phase that allows the UDF to access any resources it may need to initialize itself prior to being used in a data flow. It is assumed by the AsterixDB compiler to be stateless and thus usable as an embarrassingly parallel black box. In contrast, the AsterixDB compiler can reason about an AQL 
 UDF and involve the use of indexes during its invocation.</p>
-<p>We consider an example transformation of a raw tweet into its lightweight version called <tt>ProcessedTweet</tt>, which is defined next.</p>
+<p>As the <tt>TweetType</tt> is an open datatype, processed Tweets can be stored into the dataset after they are annotated with an extra attribute. Given the datatype and dataset above, we can create a Twitter Feed with the same datatype. Please refer to section <a href="feeds.html">Data Ingestion</a> if you have any trouble in creating feeds.</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
-
-    create type ProcessedTweet if not exists as open {
-        id: string,
-        user_name:string,
-        location:point,
-        created_at:string,
-        message_text:string,
-        country: string,
-        topics: {{string}}
+<pre class="source">    use udfs;
+
+    create feed TwitterFeed with {
+      &quot;adapter-name&quot;: &quot;push_twitter&quot;,
+      &quot;type-name&quot;: &quot;TweetType&quot;,
+      &quot;format&quot;: &quot;twitter-status&quot;,
+      &quot;consumer.key&quot;: &quot;************&quot;,
+      &quot;consumer.secret&quot;: &quot;************&quot;,
+      &quot;access.token&quot;: &quot;**********&quot;,
+      &quot;access.token.secret&quot;: &quot;*************&quot;
     };
-
-    create dataset ProcessedTweets(ProcessedTweet)
-    primary key id;
 </pre></div></div>
 
-<p>The processing required in transforming a collected tweet to its lighter version of type <tt>ProcessedTweet</tt> involves extracting the topics or hash-tags (if any) in a tweet and collecting them in the referred &#x201c;topics&#x201d; attribute for the tweet. Additionally, the latitude and longitude values (doubles) are combined into the spatial point type. Note that spatial data types are considered as first-class citizens that come with the support for creating indexes. Next we show a revised version of our example TwitterFeed that involves the use of a UDF. We assume that the UDF that contains the transformation logic into a &#x201c;ProcessedTweet&#x201d; is available as a Java UDF inside an AsterixDB library named &#x2018;testlib&#x2019;. We defer the writing of a Java UDF and its installation as part of an AsterixDB library to a later section of this document.</p>
+<p>After creating the feed, we attach the UDF onto the feed pipeline and start the feed with following statements:</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
+<pre class="source">    use udfs;
 
-    create feed ProcessedTwitterFeed if not exists
-    using &quot;push_twitter&quot;
-    ((&quot;type-name&quot;=&quot;Tweet&quot;),
-    (&quot;consumer.key&quot;=&quot;************&quot;),
-    (&quot;consumer.secret&quot;=&quot;**************&quot;),
-    (&quot;access.token&quot;=&quot;**********&quot;),
-    (&quot;access.token.secret&quot;=&quot;*************&quot;))
+    connect feed TwitterFeed to dataset ProcessedTweets apply function udfs#addMentionedUsers;
 
-    apply function testlib#addHashTagsInPlace;
+    start feed TwitterFeed;
 </pre></div></div>
 
-<p>Note that a feed adaptor and a UDF act as pluggable components. These contribute towards providing a generic &#x201c;plug-and-play&#x201d; model where custom implementations can be provided to cater to specific requirements.</p>
-<div class="section">
-<div class="section">
-<h4><a name="Building_a_Cascade_Network_of_Feeds"></a>Building a Cascade Network of Feeds</h4>
-<p>Multiple high-level applications may wish to consume the data ingested from a data feed. Each such application might perceive the feed in a different way and require the arriving data to be processed and/or persisted differently. Building a separate flow of data from the external source for each application is wasteful of resources as the pre-processing or transformations required by each application might overlap and could be done together in an incremental fashion to avoid redundancy. A single flow of data from the external source could provide data for multiple applications. To achieve this, we introduce the notion of primary and secondary feeds in AsterixDB.</p>
-<p>A feed in AsterixDB is considered to be a primary feed if it gets its data from an external data source. The objects contained in a feed (subsequent to any pre-processing) are directed to a designated AsterixDB dataset. Alternatively or additionally, these objects can be used to derive other feeds known as secondary feeds. A secondary feed is similar to its parent feed in every other aspect; it can have an associated UDF to allow for any subsequent processing, can be persisted into a dataset, and/or can be made to derive other secondary feeds to form a cascade network. A primary feed and a dependent secondary feed form a hierarchy. As an example, we next show an example AQL statement that redefines the previous feed &#x201c;ProcessedTwitterFeed&#x201d; in terms of their respective parent feed (TwitterFeed).</p>
+<p>You can check the annotated Tweets by querying the <tt>ProcessedTweets</tt> dataset:</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
-
-    drop feed ProcessedTwitterFeed if exists;
-
-    create secondary feed ProcessedTwitterFeed from feed TwitterFeed
-    apply function testlib#addHashTags;
+<pre class="source">    SELECT * FROM ProcessedTweets LIMIT 10;
+</pre></div></div>
+</div>
+<div class="section">
+<h2><a name="A_quick_look_of_the_UDF_configuration"></a><a name="udfConfiguration">A quick look of the UDF configuration</a></h2>
+<p>AsterixDB uses an XML configuration file to describe the UDFs. A user can use it to define and reuse their compiled UDFs for different purposes. Here is a snippet of the configuration used in our <a href="#UDFOnFeeds">previous example</a>:</p>
 
-    connect feed ProcessedTwitterFeed to dataset ProcessedTweets;
+<div>
+<div>
+<pre class="source">    &lt;libraryFunction&gt;
+      &lt;name&gt;addMentionedUsers&lt;/name&gt;
+      &lt;function_type&gt;SCALAR&lt;/function_type&gt;
+      &lt;argument_type&gt;TweetType&lt;/argument_type&gt;
+      &lt;return_type&gt;TweetType&lt;/return_type&gt;
+      &lt;definition&gt;org.apache.asterix.external.library.AddMentionedUsersFactory&lt;/definition&gt;
+      &lt;parameters&gt;text&lt;/parameters&gt;
+    &lt;/libraryFunction&gt;
 </pre></div></div>
 
-<p>The <tt>addHashTags</tt> function is already provided in the example UDF.To see what objects are being inserted into the dataset, we can perform a simple dataset scan after allowing a few moments for the feed to start ingesting data:</p>
+<p>Here are the explanations of the fields in the configuration file:</p>
 
 <div>
 <div>
-<pre class="source">    use dataverse feeds;
-
-    for $i in dataset ProcessedTweets limit 10 return $i;
+<pre class="source">   name: The proper name that is used for invoke the function.
+   function_type: The type of the function.
+   argument_type: The datatype of the arguments passed in. If there is more than one parameter, separate them with comma(s), e.g., `AINT32,AINT32`.
+   return_type: The datatype of the returning value.
+   definition: A reference to the function factory.
+   parameters: The parameters passed into the function.
 </pre></div></div>
 
-<p>For an example of how to write a Java UDF from scratch, the source for the example UDF that has been used in this tutorial is available [here] (<a class="externalLink" href="https://github.com/apache/asterixdb/tree/master/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library">https://github.com/apache/asterixdb/tree/master/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library</a>)</p></div></div></div>
+<p>In our feeds example, we passed in <tt>&quot;text&quot;</tt> as a parameter to the function so it knows which field to look at to get the Tweet text. If the Twitter API were to change its field names in the future, we can accommodate that change by simply modifying the configuration file instead of recompiling the whole UDF package. This feature can be further utilized in use cases where a user has a Machine Learning algorithm with different trained model files. If you are interested, You can find more examples <a class="externalLink" href="https://github.com/apache/asterixdb/tree/master/asterixdb/asterix-external-data/src/test/java/org/apache/asterix/external/library">here</a></p></div>
 <div class="section">
-<h2><a name="Unstalling_an_AsterixDB_Library"></a><a name="installingUDF">Unstalling an AsterixDB Library</a></h2>
-<p>To uninstall a library, use the Managix uninstall command as follows:</p>
+<h2><a name="Unstalling_an_UDF_Library"></a><a name="uninstall">Unstalling an UDF Library</a></h2>
+<p>If you want to uninstall the UDF library, put AsterixDB into <tt>INACTVIVE</tt> mode and run following command:</p>
 
 <div>
 <div>
-<pre class="source">    $ managix stop -n my_asterix
-
-    $ managix uninstall -n my_asterix -d feeds -l testlib
+<pre class="source">    $ bin/udf.sh -m u -d DATAVERSE_NAME -l LIBRARY_NAME
 </pre></div></div></div>
         </div>
       </div>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/ansible.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/ansible.html b/docs/0.9.4/ansible.html
new file mode 100644
index 0000000..4722841
--- /dev/null
+++ b/docs/0.9.4/ansible.html
@@ -0,0 +1,293 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from target/generated-site/markdown/ansible.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; Installation using Ansible</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 class="active"><a href="#"><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><a href="sqlpp/builtins.html" title="Builtin Functions"><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>Installation using Ansible</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="atoc" id="#toc">Table of Contents</a></h2>
+<ul>
+
+<li><a href="#Introduction">Introduction</a></li>
+<li><a href="#Prerequisites">Prerequisites</a></li>
+<li><a href="#config">Cluster Configuration</a></li>
+<li><a href="#lifecycle">Cluster Lifecycle Management</a></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">
+<h2><a name="Introduction" id="Introduction">Introduction</a></h2>
+<p>This installation option provides several wrapped <a class="externalLink" href="https://www.ansible.com/">Ansible</a>-based scripts to deploy, start, stop, and erase an AsterixDB instance on a multi-node cluster without requiring users to interact with each individual node in the cluster.</p></div>
+<div class="section">
+<h2><a name="Prerequisites" id="Prerequisites">Prerequisites</a></h2>
+<ul>
+
+<li>
+
+<p>Supported operating systems: <b>Linux</b> and <b>MacOS</b></p>
+</li>
+<li>
+
+<p>Install pip on your client machine:</p>
+<p>CentOS</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo yum install python-pip
+</pre></div></div>
+
+<p>Ubuntu</p>
+
+<div>
+<div>
+<pre class="source"> $ sudo apt-get install python-pip
+</pre></div></div>
+
+<p>macOS</p>
+
+<div>
+<div>
+<pre class="source"> $ brew install pip
+</pre></div></div>
+</li>
+<li>
+
+<p>Install Ansible, boto, and boto3 on your client machine:</p>
+
+<div>
+<div>
+<pre class="source"> $ pip install ansible
+ $ pip install boto
+ $ pip install boto3
+</pre></div></div>
+
+<p>Note that you might need <tt>sudo</tt> depending on your system configuration.</p>
+<p><b>Make sure that the version of Ansible is no less than 2.2.1.0</b>:</p>
+
+<div>
+<div>
+<pre class="source"> $ ansible --version
+ ansible 2.2.1.0
+</pre></div></div>
+</li>
+<li>
+
+<p>Download the AsterixDB distribution package, unzip it, and navigate to <tt>opt/ansible/</tt></p>
+
+<div>
+<div>
+<pre class="source"> $ cd opt/ansible
+</pre></div></div>
+
+<p>The following files and directories are in the directory <tt>opt/ansible</tt>:</p>
+
+<div>
+<div>
+<pre class="source"> README  bin  conf  yaml
+</pre></div></div>
+
+<p><tt>bin</tt> contains scripts that deploy, start, stop and erase a multi-node AsterixDB cluster, according to the configuration specified in files under <tt>conf</tt>, and <tt>yaml</tt> contains internal Ansible scripts that the shell scripts in <tt>bin</tt> use.</p>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Configuration"></a><a name="config" id="config">Cluster Configuration</a></h2>
+<ul>
+
+<li>
+
+<p><b>Nodes and account</b>. Edit the inventory file <tt>conf/inventory</tt> when necessary. You mostly only need to specify the node DNS names (or IPs) for the cluster controller, i.e., the master node, in the <b>[cc]</b> section, and node controllers, i.e., slave nodes, in the <b>[ncs]</b> section. The following example configures a cluster with two slave nodes (172.0.1.11 and 172.0.1.12) and one master node (172.0.1.10).</p>
+
+<div>
+<div>
+<pre class="source"> [cc]
+ 172.0.1.10
+
+ [ncs]
+ 172.0.1.11
+ 172.0.1.12
+</pre></div></div>
+
+<p><b>Configure passwordless ssh from your current client that runs the scripts to all nodes listed in <tt>conf/inventory</tt> as well as <tt>localhost</tt>.</b> If the ssh user account for target machines is different from your current username, please uncomment and edit the following two lines:</p>
+
+<div>
+<div>
+<pre class="source"> ;[all:vars]
+ ;ansible_ssh_user=&lt;fill with your ssh account username&gt;
+</pre></div></div>
+
+<p>If you want to specify advanced Ansible builtin variables, please refer to the <a class="externalLink" href="http://docs.ansible.com/ansible/intro_inventory.html">Ansible documentation</a>.</p>
+</li>
+<li>
+
+<p><b>Remote working directories</b>. Edit <tt>conf/instance_settings.yml</tt> to change the remote binary directory (the variable &#x201c;binarydir&#x201d;) when necessary. By default, the binary directory will be under the home directory (as the value of Ansible builtin variable ansible_env.HOME) of the ssh user account on each node.</p>
+</li>
+</ul></div>
+<div class="section">
+<h2><a name="Cluster_Lifecycle_Management"></a><a name="lifecycle" id="lifecycle">Cluster Lifecycle Management</a></h2>
+<ul>
+
+<li>
+
+<p>Deploy the binary to all nodes:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/deploy.sh
+</pre></div></div>
+</li>
+<li>
+
+<p>Every time before starting the AsterixDB cluster, you can edit the instance configuration file <tt>conf/instance/cc.conf</tt>, except that IP addresses/DNS names are generated and cannot be changed. All available parameters and their usage can be found <a href="ncservice.html#Parameters">here</a>.</p>
+</li>
+<li>
+
+<p>Launch your AsterixDB cluster:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/start.sh
+</pre></div></div>
+
+<p>Now you can use the multi-node AsterixDB cluster by opening the master node listed in <tt>conf/inventory</tt> at port <tt>19001</tt> (which can be customized in <tt>conf/instance/cc.conf</tt>) in your browser.</p>
+</li>
+<li>
+
+<p>If you want to stop the the multi-node AsterixDB cluster, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/stop.sh
+</pre></div></div>
+</li>
+<li>
+
+<p>If you want to remove the binary on all nodes, run the following script:</p>
+
+<div>
+<div>
+<pre class="source"> $ bin/erase.sh
+</pre></div></div>
+</li>
+</ul></div>
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.
+      </div>
+        </div>
+      </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/b2f1d3e6/docs/0.9.4/api.html
----------------------------------------------------------------------
diff --git a/docs/0.9.4/api.html b/docs/0.9.4/api.html
index f1d98be..2de7ec2 100644
--- a/docs/0.9.4/api.html
+++ b/docs/0.9.4/api.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/api.md at 2018-10-02
+ | Generated by Apache Maven Doxia Site Renderer 1.8.1 from src/site/markdown/api.md at 2018-10-11
  | 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="20181002" />
+    <meta name="Date-Revision-yyyymmdd" content="20181011" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; HTTP API to AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.7.min.css" />
@@ -26,8 +26,8 @@
 
       <div id="breadcrumbs">
         <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2018-10-02</li>
-      <li id="projectVersion" class="pull-right">Version: 0.9.4</li>
+        <li id="publishDate">Last Published: 2018-10-11</li>
+      <li id="projectVersion" class="pull-right">Version: 0.9.5-SNAPSHOT</li>
       <li class="pull-right"><a href="index.html" title="Documentation Home">Documentation Home</a></li>
         </ul>
       </div>
@@ -40,26 +40,26 @@
     <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="Option 1: using SQL++"><span class="none"></span>Option 1: using SQL++</a></li>
-    <li><a href="aql/primer.html" title="Option 2: using AQL"><span class="none"></span>Option 2: using AQL</a></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 - SQL++</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><a href="sqlpp/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
-      <li class="nav-header">Queries - AQL</li>
-    <li><a href="aql/manual.html" title="The Asterix Query Language (AQL)"><span class="none"></span>The Asterix Query Language (AQL)</a></li>
-    <li><a href="aql/builtins.html" title="Builtin Functions"><span class="none"></span>Builtin Functions</a></li>
       <li class="nav-header">API/SDK</li>
     <li class="active"><a href="#"><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/fulltext.html" title="Support of Full-text Queries"><span class="none"></span>Support of Full-text Queries</a></li>
     <li><a href="aql/externaldata.html" title="Accessing External Data"><span class="none"></span>Accessing External Data</a></li>
-    <li><a href="feeds/tutorial.html" title="Support for Data Ingestion"><span class="none"></span>Support for Data Ingestion</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="aql/filters.html" title="Filter-Based LSM Index Acceleration"><span class="none"></span>Filter-Based LSM Index Acceleration</a></li>
-    <li><a href="aql/similarity.html" title="Support of Similarity Queries"><span class="none"></span>Support of Similarity Queries</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">


[12/17] asterixdb-site git commit: fix missing docs and url

Posted by im...@apache.org.
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>