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 2017/01/25 19:56:11 UTC

[01/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Repository: asterixdb-site
Updated Branches:
  refs/heads/asf-site bf2c56b06 -> d5b11d834


http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/sqlpp/primer-sqlpp.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/sqlpp/primer-sqlpp.html b/docs/0.9.0/sqlpp/primer-sqlpp.html
index 3e4ac57..1eccf62 100644
--- a/docs/0.9.0/sqlpp/primer-sqlpp.html
+++ b/docs/0.9.0/sqlpp/primer-sqlpp.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/udf.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/udf.html b/docs/0.9.0/udf.html
index d3b7117..67b8ce6 100644
--- a/docs/0.9.0/udf.html
+++ b/docs/0.9.0/udf.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Support for User Defined Functions in AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/yarn.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/yarn.html b/docs/0.9.0/yarn.html
index c4e95f3..1ff88c3 100644
--- a/docs/0.9.0/yarn.html
+++ b/docs/0.9.0/yarn.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Introduction</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     


[09/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/aql/externaldata.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/aql/externaldata.html b/content/docs/0.9.0/aql/externaldata.html
index c065ab3..57b2a78 100644
--- a/content/docs/0.9.0/aql/externaldata.html
+++ b/content/docs/0.9.0/aql/externaldata.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/aql/filters.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/aql/filters.html b/content/docs/0.9.0/aql/filters.html
index 94f3be0..4d3b0bb 100644
--- a/content/docs/0.9.0/aql/filters.html
+++ b/content/docs/0.9.0/aql/filters.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/aql/fulltext.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/aql/fulltext.html b/content/docs/0.9.0/aql/fulltext.html
index d468395..30c299e 100644
--- a/content/docs/0.9.0/aql/fulltext.html
+++ b/content/docs/0.9.0/aql/fulltext.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/aql/manual.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/aql/manual.html b/content/docs/0.9.0/aql/manual.html
index 1bdfa3b..d0b4293 100644
--- a/content/docs/0.9.0/aql/manual.html
+++ b/content/docs/0.9.0/aql/manual.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/aql/primer.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/aql/primer.html b/content/docs/0.9.0/aql/primer.html
index f845045..22e13c7 100644
--- a/content/docs/0.9.0/aql/primer.html
+++ b/content/docs/0.9.0/aql/primer.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/aql/similarity.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/aql/similarity.html b/content/docs/0.9.0/aql/similarity.html
index 32cf5e0..e55d8c8 100644
--- a/content/docs/0.9.0/aql/similarity.html
+++ b/content/docs/0.9.0/aql/similarity.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/csv.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/csv.html b/content/docs/0.9.0/csv.html
index 709fae5..35a7184 100644
--- a/content/docs/0.9.0/csv.html
+++ b/content/docs/0.9.0/csv.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; CSV Support in AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/datamodel.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/datamodel.html b/content/docs/0.9.0/datamodel.html
index e835a73..cf3b2bf 100644
--- a/content/docs/0.9.0/datamodel.html
+++ b/content/docs/0.9.0/datamodel.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/feeds/tutorial.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/feeds/tutorial.html b/content/docs/0.9.0/feeds/tutorial.html
index 337391a..2d47f54 100644
--- a/content/docs/0.9.0/feeds/tutorial.html
+++ b/content/docs/0.9.0/feeds/tutorial.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/index.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/index.html b/content/docs/0.9.0/index.html
index ef83927..72bff12 100644
--- a/content/docs/0.9.0/index.html
+++ b/content/docs/0.9.0/index.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/install.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/install.html b/content/docs/0.9.0/install.html
index 5d80d03..1d085a3 100644
--- a/content/docs/0.9.0/install.html
+++ b/content/docs/0.9.0/install.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Introduction</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/ncservice.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/ncservice.html b/content/docs/0.9.0/ncservice.html
index a0d481e..a076b65 100644
--- a/content/docs/0.9.0/ncservice.html
+++ b/content/docs/0.9.0/ncservice.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; <a id="toc">Table of Contents</a></title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/overview.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/overview.html b/content/docs/0.9.0/overview.html
index 8452d0b..ac39a99 100644
--- a/content/docs/0.9.0/overview.html
+++ b/content/docs/0.9.0/overview.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     


[05/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/aql/builtins.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/aql/builtins.html b/docs/0.9.0/aql/builtins.html
new file mode 100644
index 0000000..1eb5137
--- /dev/null
+++ b/docs/0.9.0/aql/builtins.html
@@ -0,0 +1,8493 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-01-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<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="20170125" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Builtin Functions</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.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.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</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: 2017-01-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.9.0</li>
+      
+                                            <li class="divider pull-right">|</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="span3">
+          <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">
+          <i class="none"></i>
+        Option 1: using NCService</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../install.html" title="Option 2: using Managix">
+          <i class="none"></i>
+        Option 2: using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Option 3: using YARN">
+          <i class="none"></i>
+        Option 3: using YARN</a>
+            </li>
+                              <li class="nav-header">AsterixDB Primer</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/primer-sqlpp.html" title="Option 1: using SQL++">
+          <i class="none"></i>
+        Option 1: using SQL++</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="Option 2: using AQL">
+          <i class="none"></i>
+        Option 2: using AQL</a>
+            </li>
+                              <li class="nav-header">Data Model</li>
+                                
+      <li>
+    
+                          <a href="../datamodel.html" title="The Asterix Data Model">
+          <i class="none"></i>
+        The Asterix Data Model</a>
+            </li>
+                              <li class="nav-header">Queries - SQL++</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/manual.html" title="The SQL++ Query Language">
+          <i class="none"></i>
+        The SQL++ Query Language</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../sqlpp/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Queries - AQL</li>
+                                
+      <li>
+    
+                          <a href="../aql/manual.html" title="The Asterix Query Language (AQL)">
+          <i class="none"></i>
+        The Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Builtin Functions</a>
+          </li>
+                              <li class="nav-header">Advanced Features</li>
+                                
+      <li>
+    
+                          <a href="../aql/similarity.html" title="Support of Similarity Queries">
+          <i class="none"></i>
+        Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/fulltext.html" title="Support of Full-text Queries">
+          <i class="none"></i>
+        Support of Full-text Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion">
+          <i class="none"></i>
+        Support for Data Ingestion</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="User Defined Functions">
+          <i class="none"></i>
+        User Defined Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                              <li class="nav-header">API/SDK</li>
+                                
+      <li>
+    
+                          <a href="../api.html" title="HTTP API">
+          <i class="none"></i>
+        HTTP API</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <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="span9" >
+                                  
+            <!-- ! 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="#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. <!-- ! 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></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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 1.5707963267948966, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2.718281828459045, &quot;v2&quot;: 7.38905609893065, &quot;v3&quot;: 1.0, &quot;v4&quot;: 1.6487212707001282, &quot;v5&quot;: Infinity }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="floor"></a>floor</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.6931471805599453, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.3010299956639812, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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="round_half_to_even"></a>round_half_to_even</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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></div>
+<div class="section">
+<h3><a name="sign"></a>sign</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+<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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>concat(&quot;test &quot;, &quot;driven &quot;, &quot;development&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: contains(&quot;I like iphone&quot;, &quot;phone&quot;), &quot;v2&quot;: contains(&quot;one&quot;, &quot;phone&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: ends_with(&quot; love sprint its shortcut_menu is awesome:)&quot;, &quot;:)&quot;),
+  &quot;v2&quot;: ends_with(&quot; awsome:)&quot;, &quot;:-)&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="initcap_or_title"></a>initcap (or title)</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: initcap(&quot;ASTERIXDB is here!&quot;), &quot;v2&quot;: title(&quot;ASTERIXDB is here!&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>length(&quot;test string&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>11
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="lower"></a>lower</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>lower(&quot;ASTERIXDB&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ltrim(&quot;me like iphone&quot;, &quot;eml&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; like iphone&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="position"></a>position</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: position(&quot;ppphonepp&quot;, &quot;phone&quot;),
+  &quot;v2&quot;: position(&quot;hone&quot;, &quot;phone&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: regexp_like(&quot; can't stand at&amp;t the network is horrible:(&quot;, &quot;.*at&amp;t.*&quot;),
+  &quot;v2&quot;: regexp_like(&quot;at&amp;t&quot;, &quot;.*att.*&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0, &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 class="source">
+<div class="source">
+<pre>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 replace 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 class="source">
+<div class="source">
+<pre>regexp_replace(&quot; like iphone the voicemail_service is awesome&quot;, &quot; like iphone&quot;, &quot;like android&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;like android 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 class="source">
+<div class="source">
+<pre>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>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>.</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 class="source">
+<div class="source">
+<pre>repeat(&quot;test&quot;, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;testtesttest&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="rtrim"></a>rtrim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: rtrim(&quot;i like iphone&quot;, &quot;iphone&quot;),
+  &quot;v2&quot;: rtrim(&quot;i like iphone&quot;, &quot;oneiph&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>split(&quot;test driven development&quot;, &quot; &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string_concat"></a>string_concat</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_concat([&quot;ASTERIX&quot;, &quot; &quot;, &quot;ROCKS!&quot;]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_join([&quot;ASTERIX&quot;, &quot;ROCKS~&quot;], &quot;!! &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_to_codepoint(&quot;Hello ASTERIX!&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>codepoint_to_string([72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;Hello ASTERIX!&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substr"></a>substr</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>substr(&quot;test string&quot;, 6, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;str&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>substring_before(&quot; like iphone&quot;, &quot;iphone&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring_after(&quot; like iphone&quot;, &quot;iph&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;one&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="trim"></a>trim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>trim(&quot;i like iphone&quot;, &quot;iphoen&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>upper(&quot;hello&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+<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 class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>sub_binary(hex(&quot;AABBCCDD&quot;), 4);
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: create_point(30.0,70.0) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;line&quot;: create_line(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;rectangle&quot;: create_rectangle(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>create_circle(point, radius)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>circle</tt> using <tt>point</tt> and <tt>ra

<TRUNCATED>

[07/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/sqlpp/manual.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/sqlpp/manual.html b/content/docs/0.9.0/sqlpp/manual.html
new file mode 100644
index 0000000..845214f
--- /dev/null
+++ b/content/docs/0.9.0/sqlpp/manual.html
@@ -0,0 +1,4183 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-01-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<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="20170125" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; The SQL++ Query Language</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.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.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</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: 2017-01-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.9.0</li>
+      
+                                            <li class="divider pull-right">|</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="span3">
+          <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">
+          <i class="none"></i>
+        Option 1: using NCService</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../install.html" title="Option 2: using Managix">
+          <i class="none"></i>
+        Option 2: using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Option 3: using YARN">
+          <i class="none"></i>
+        Option 3: using YARN</a>
+            </li>
+                              <li class="nav-header">AsterixDB Primer</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/primer-sqlpp.html" title="Option 1: using SQL++">
+          <i class="none"></i>
+        Option 1: using SQL++</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="Option 2: using AQL">
+          <i class="none"></i>
+        Option 2: using AQL</a>
+            </li>
+                              <li class="nav-header">Data Model</li>
+                                
+      <li>
+    
+                          <a href="../datamodel.html" title="The Asterix Data Model">
+          <i class="none"></i>
+        The Asterix Data Model</a>
+            </li>
+                              <li class="nav-header">Queries - SQL++</li>
+                                
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>The SQL++ Query Language</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../sqlpp/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Queries - AQL</li>
+                                
+      <li>
+    
+                          <a href="../aql/manual.html" title="The Asterix Query Language (AQL)">
+          <i class="none"></i>
+        The Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Advanced Features</li>
+                                
+      <li>
+    
+                          <a href="../aql/similarity.html" title="Support of Similarity Queries">
+          <i class="none"></i>
+        Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/fulltext.html" title="Support of Full-text Queries">
+          <i class="none"></i>
+        Support of Full-text Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion">
+          <i class="none"></i>
+        Support for Data Ingestion</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="User Defined Functions">
+          <i class="none"></i>
+        User Defined Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                              <li class="nav-header">API/SDK</li>
+                                
+      <li>
+    
+                          <a href="../api.html" title="HTTP API">
+          <i class="none"></i>
+        HTTP API</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <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="span9" >
+                                  
+            <!-- ! 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>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<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="#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="#Abbreviatory_field_access_expressions">Abbreviatory 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 clauases 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="#Parsing_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="#Declarations">Declarations</a></li>
+    
+<li><a href="#Lifecycle_management_statements">Lifecycle management statements</a>
+    
+<ul>
+      
+<li><a href="#Dataverses">Dataverses</a></li>
+      
+<li><a href="#Datasets">Datasets</a></li>
+      
+<li><a href="#Types">Types</a></li>
+      
+<li><a href="#Functions">Functions</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>
+</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>
+
+<div class="source">
+<div class="source">
+<pre>Expression ::= OperatorExpression | CaseExpression | QuantifiedExpression
+</pre></div></div>
+<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>
+<p>Note that in the following text, words enclosed in angle brackets denote keywords that are not case-sensitive.</p></div>
+<div class="section">
+<h2><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 class="source">
+<div class="source">
+<pre>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</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;=, 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 encolosing 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" id="Arithmetic_operators">Arithmetic operators</a></h3>
+<p>Arithemtic 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 </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" 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" 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>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; </td>
+      
+<td>Less than </td>
+      
+<td>SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;10; </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>&gt; </td>
+      
+<td>Greater than </td>
+      
+<td>SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&gt;10; </td>
+    </tr>
+    
+<tr class="a">
+      
+<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="b">
+      
+<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="a">
+      
+<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="b">
+      
+<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>
+  </tbody>
+</table></div></div></div>
+<div class="section">
+<h3><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" id="Case_expressions">Case expressions</a></h2>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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" id="Quantified_expressions">Quantified expressions</a></h2>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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" id="Path_expressions">Path expressions</a></h2>
+
+<div class="source">
+<div class="source">
+<pre>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, e.g., 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 class="source">
+<div class="source">
+<pre>({&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 class="source">
+<div class="source">
+<pre>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 class="section">
+<h3><a name="Literals" id="Literals">Literals</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>'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 class="source">
+<div class="source">
+<pre>VariableReference     ::= &lt;IDENTIFIER&gt;|&lt;DelimitedIdentifier&gt;
+&lt;IDENTIFIER&gt;          ::= &lt;LETTER&gt; (&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, e.g., `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.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>tweet
+id
+`SELECT`
+`my-function`
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Parenthesized_expressions" id="Parenthesized_expressions">Parenthesized expressions</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>( 1 + 1 )
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Function_call_expressions" id="Function_call_expressions">Function call expressions</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>length('a string')
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Constructors" id="Constructors">Constructors</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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, a new object with 2 fields, and a new multiset with 5 items, respectively. Array elements or multiset elements can be homogeneous (as in the first example), which is the common case, or they may be heterogeneous (as in the third 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 a record must be 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 class="source">
+<div class="source">
+<pre>[ 'a', 'b', 'c', 'c' ]
+
+{
+  'project name': 'Hyracks',
+  'project members': [ 'vinayakb', 'dtabass', 'chenli', 'tsotras', 'tillw' ]
+}
+
+{{ 42, &quot;forty-two!&quot;, { &quot;rank&quot;: &quot;Captain&quot;, &quot;name&quot;: &quot;America&quot; }, 3.14159, 42 }}
+</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 class="source">
+<div class="source">
+<pre>Query ::= (Expression | SelectStatement) &quot;;&quot;
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h2><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 class="source">
+<div class="source">
+<pre>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; | &lt;CORRELATE&gt; | &lt;FLATTEN&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; Variable &lt;AS&gt; VariableReference (&quot;,&quot; Variable &lt;AS&gt; VariableReference )* &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 class="source">
+<div class="source">
+<pre>{&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 class="source">
+<div class="source">
+<pre>{&quot;messageId&quot;:2,&quot;authorId&quot;:1,&quot;inResponseTo&quot;:4,&quot;senderLocation&quot;:[41.66,80.87],&quot;message&quot;:&quot; dislike iphone 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 samsung 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 at&amp;t 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 t-mobile 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 verizon 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 motorola 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 at&amp;t 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_VALUE_Clause"></a><a name="Select_element" id="Select_element">SELECT VALUE Clause</a></h3>
+<p>The <tt>SELECT VALUE</tt> clause in SQL++ returns a collection 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>The following example shows a standard-alone <tt>SELECT VALUE</tt>, which wraps a value into an array.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT VALUE 1;
+</pre></div></div>
+<p>This query return:</p>
+
+<div class="source">
+<div class="source">
+<pre>[
+  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 class="source">
+<div class="source">
+<pre>SELECT VALUE user
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+<p>This query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[{
+    &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 class="source">
+<div class="source">
+<pre>SELECT user.alias user_alias, user.name user_name
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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_"></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>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 variable generated in the <tt>FROM</tt> clause, this query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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 t-mobile 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 samsung 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 class="source">
+<div class="source">
+<pre>SELECT DISTINCT * FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+<p>This query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>SELECT DISTINCT VALUE foo FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+<p>This version of the query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ 1
+, 2
+, 3
+ ]
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><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 class="source">
+<div class="source">
+<pre>SELECT substr(user.name, 10), user.alias
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+<p>This query outputs:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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="Abbreviatory_field_access_expressions" id="Abbreviatory_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.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT substr(name, 10) AS lname, alias
+FROM GleambookUsers user
+WHERE id = 1;
+</pre></div></div>
+<p>Outputs:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like samsung 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>SELECT VALUE foo
+FROM [1, 2, 2, 3] AS foo
+WHERE foo &gt; 2;
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[
+  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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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" 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 class="source">
+<div class="source">
+<pre>SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers, GleambookMessages
+WHERE GleambookMessages.authorId = GleambookUsers.id;
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like samsung the plan is amazing&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot;
+} ]
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers,
+  (
+    SELECT VALUE GleambookMessages
+    FROM GleambookMessages
+    WHERE GleambookMessages.authorId = GleambookUsers.id
+  );
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>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></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 class="source">
+<div class="source">
+<pre>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" 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like samsung the plan is amazing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like t-mobile 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>&lt;GROUP&gt; &lt;AS&gt; Variable (&quot;(&quot; Variable &lt;AS&gt; VariableReference (&quot;,&quot; Variable &lt;AS&gt; VariableReference )* &quot;)&quot;)?
+</pre></div></div>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 at&amp;t 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 iphone 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 at&amp;t 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 verizon 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 motorola 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 t-mobile its platform is mind-blowing&quot;
+            }
+        },
+        {
+            &quot;msg&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 samsung the plan is amazing&quot;
+            }
+        }
+    ],
+    &quot;uid&quot;: 2
+} ]
+</pre></div></div>
+<p>As we can see from the above query result, each group in the example query&#x2019;s output has an associated group variable value called <tt>msgs</tt> that appears in the <tt>SELECT *</tt>&#x2019;s result. This variable contains a collection of objects associated with the group; each of the group&#x2019;s <tt>message</tt> values appears in the <tt>msg</tt> field of the objects in the <tt>msgs</tt> collection.</p>
+<p>The group variable in SQL++ makes more complex, composable, nested subqueries over a group possible, which is important given the more complex data model of SQL++ (relative to SQL). As a simple example of this, as we really just want the messages associated with each user, we might wish to avoid the &#x201c;extra wrapping&#x201d; of each message as the <tt>msg</tt> field of a object. (That wrapping is useful in more complex cases, but is essentially just in the way here.) We can use a subquery in the <tt>SELECT</tt> clase to tunnel through the extra nesting and produce the desired result.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT uid, (SELECT VALUE g.msg FROM g) AS msgs
+FROM GleambookMessages gbm
+GROUP BY gbm.authorId AS uid
+GROUP AS g(gbm as msg);
+</pre></div></div>
+<p>This variant of the example query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>   [ {
+       &quot;msgs&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 at&amp;t its plan is terrible&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 iphone its touch-screen is horrible&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 at&amp;t the network is horrible:(&quot;
+           },
+           {
+               &quot;senderLocation&quot;: [
+                   40.33,
+                   80.87
+               ],
+               &quot;inResponseTo&quot;: 11,
+               &quot;messageId&quot;: 8,
+               &quot;authorId&quot;: 1,
+               &quot;message&

<TRUNCATED>

[06/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/sqlpp/primer-sqlpp.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/sqlpp/primer-sqlpp.html b/content/docs/0.9.0/sqlpp/primer-sqlpp.html
index 3e4ac57..1eccf62 100644
--- a/content/docs/0.9.0/sqlpp/primer-sqlpp.html
+++ b/content/docs/0.9.0/sqlpp/primer-sqlpp.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/udf.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/udf.html b/content/docs/0.9.0/udf.html
index d3b7117..67b8ce6 100644
--- a/content/docs/0.9.0/udf.html
+++ b/content/docs/0.9.0/udf.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Support for User Defined Functions in AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/yarn.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/yarn.html b/content/docs/0.9.0/yarn.html
index c4e95f3..1ff88c3 100644
--- a/content/docs/0.9.0/yarn.html
+++ b/content/docs/0.9.0/yarn.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Introduction</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/api.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/api.html b/docs/0.9.0/api.html
index 1cb9a25..e031454 100644
--- a/docs/0.9.0/api.html
+++ b/docs/0.9.0/api.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; HTTP API to AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     


[11/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
fix SQLPP/AQL function docs

Change-Id: Iacd392d2659256589eb73c47403c00af136e36a8
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1469
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/d5b11d83
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb-site/tree/d5b11d83
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb-site/diff/d5b11d83

Branch: refs/heads/asf-site
Commit: d5b11d834a5431caafd6b9a551566fd7b5397168
Parents: bf2c56b
Author: Ian Maxon <ia...@maxons.email>
Authored: Wed Jan 25 10:48:05 2017 -0800
Committer: Ian Maxon <im...@apache.org>
Committed: Wed Jan 25 11:55:40 2017 -0800

----------------------------------------------------------------------
 content/docs/0.9.0/api.html                |    6 +-
 content/docs/0.9.0/aql/builtins.html       | 8493 ++++++++++++++++++++++
 content/docs/0.9.0/aql/externaldata.html   |    6 +-
 content/docs/0.9.0/aql/filters.html        |    6 +-
 content/docs/0.9.0/aql/fulltext.html       |    6 +-
 content/docs/0.9.0/aql/manual.html         |    6 +-
 content/docs/0.9.0/aql/primer.html         |    6 +-
 content/docs/0.9.0/aql/similarity.html     |    6 +-
 content/docs/0.9.0/csv.html                |    6 +-
 content/docs/0.9.0/datamodel.html          |    6 +-
 content/docs/0.9.0/feeds/tutorial.html     |    6 +-
 content/docs/0.9.0/index.html              |    6 +-
 content/docs/0.9.0/install.html            |    6 +-
 content/docs/0.9.0/ncservice.html          |    6 +-
 content/docs/0.9.0/overview.html           |    6 +-
 content/docs/0.9.0/sqlpp/builtins.html     | 8494 +++++++++++++++++++++++
 content/docs/0.9.0/sqlpp/manual.html       | 4183 +++++++++++
 content/docs/0.9.0/sqlpp/primer-sqlpp.html |    6 +-
 content/docs/0.9.0/udf.html                |    6 +-
 content/docs/0.9.0/yarn.html               |    6 +-
 docs/0.9.0/api.html                        |    6 +-
 docs/0.9.0/aql/builtins.html               | 8493 ++++++++++++++++++++++
 docs/0.9.0/aql/externaldata.html           |    6 +-
 docs/0.9.0/aql/filters.html                |    6 +-
 docs/0.9.0/aql/fulltext.html               |    6 +-
 docs/0.9.0/aql/manual.html                 |    6 +-
 docs/0.9.0/aql/primer.html                 |    6 +-
 docs/0.9.0/aql/similarity.html             |    6 +-
 docs/0.9.0/csv.html                        |    6 +-
 docs/0.9.0/datamodel.html                  |    6 +-
 docs/0.9.0/feeds/tutorial.html             |    6 +-
 docs/0.9.0/index.html                      |    6 +-
 docs/0.9.0/install.html                    |    6 +-
 docs/0.9.0/ncservice.html                  |    6 +-
 docs/0.9.0/overview.html                   |    6 +-
 docs/0.9.0/sqlpp/builtins.html             | 8494 +++++++++++++++++++++++
 docs/0.9.0/sqlpp/manual.html               | 4183 +++++++++++
 docs/0.9.0/sqlpp/primer-sqlpp.html         |    6 +-
 docs/0.9.0/udf.html                        |    6 +-
 docs/0.9.0/yarn.html                       |    6 +-
 40 files changed, 42442 insertions(+), 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/api.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/api.html b/content/docs/0.9.0/api.html
index 1cb9a25..e031454 100644
--- a/content/docs/0.9.0/api.html
+++ b/content/docs/0.9.0/api.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; HTTP API to AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     


[04/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/aql/externaldata.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/aql/externaldata.html b/docs/0.9.0/aql/externaldata.html
index c065ab3..57b2a78 100644
--- a/docs/0.9.0/aql/externaldata.html
+++ b/docs/0.9.0/aql/externaldata.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/aql/filters.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/aql/filters.html b/docs/0.9.0/aql/filters.html
index 94f3be0..4d3b0bb 100644
--- a/docs/0.9.0/aql/filters.html
+++ b/docs/0.9.0/aql/filters.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/aql/fulltext.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/aql/fulltext.html b/docs/0.9.0/aql/fulltext.html
index d468395..30c299e 100644
--- a/docs/0.9.0/aql/fulltext.html
+++ b/docs/0.9.0/aql/fulltext.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/aql/manual.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/aql/manual.html b/docs/0.9.0/aql/manual.html
index 1bdfa3b..d0b4293 100644
--- a/docs/0.9.0/aql/manual.html
+++ b/docs/0.9.0/aql/manual.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/aql/primer.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/aql/primer.html b/docs/0.9.0/aql/primer.html
index f845045..22e13c7 100644
--- a/docs/0.9.0/aql/primer.html
+++ b/docs/0.9.0/aql/primer.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/aql/similarity.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/aql/similarity.html b/docs/0.9.0/aql/similarity.html
index 32cf5e0..e55d8c8 100644
--- a/docs/0.9.0/aql/similarity.html
+++ b/docs/0.9.0/aql/similarity.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/csv.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/csv.html b/docs/0.9.0/csv.html
index 709fae5..35a7184 100644
--- a/docs/0.9.0/csv.html
+++ b/docs/0.9.0/csv.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; CSV Support in AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/datamodel.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/datamodel.html b/docs/0.9.0/datamodel.html
index e835a73..cf3b2bf 100644
--- a/docs/0.9.0/datamodel.html
+++ b/docs/0.9.0/datamodel.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/feeds/tutorial.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/feeds/tutorial.html b/docs/0.9.0/feeds/tutorial.html
index 337391a..2d47f54 100644
--- a/docs/0.9.0/feeds/tutorial.html
+++ b/docs/0.9.0/feeds/tutorial.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/index.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/index.html b/docs/0.9.0/index.html
index ef83927..72bff12 100644
--- a/docs/0.9.0/index.html
+++ b/docs/0.9.0/index.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; AsterixDB</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/install.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/install.html b/docs/0.9.0/install.html
index 5d80d03..1d085a3 100644
--- a/docs/0.9.0/install.html
+++ b/docs/0.9.0/install.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; Introduction</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/ncservice.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/ncservice.html b/docs/0.9.0/ncservice.html
index a0d481e..a076b65 100644
--- a/docs/0.9.0/ncservice.html
+++ b/docs/0.9.0/ncservice.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <meta http-equiv="Content-Language" content="en" />
     <title>AsterixDB &#x2013; <a id="toc">Table of Contents</a></title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     

http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/overview.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/overview.html b/docs/0.9.0/overview.html
index 8452d0b..ac39a99 100644
--- a/docs/0.9.0/overview.html
+++ b/docs/0.9.0/overview.html
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2017-01-24
+ | Generated by Apache Maven Doxia at 2017-01-25
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <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="20170124" />
+    <meta name="Date-Revision-yyyymmdd" content="20170125" />
     <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.3.0.min.css" />
@@ -48,7 +48,7 @@
         <ul class="breadcrumb">
                 
                     
-                  <li id="publishDate">Last Published: 2017-01-24</li>
+                  <li id="publishDate">Last Published: 2017-01-25</li>
                       
                 
                     


[02/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/sqlpp/manual.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/sqlpp/manual.html b/docs/0.9.0/sqlpp/manual.html
new file mode 100644
index 0000000..845214f
--- /dev/null
+++ b/docs/0.9.0/sqlpp/manual.html
@@ -0,0 +1,4183 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-01-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<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="20170125" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; The SQL++ Query Language</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.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.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</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: 2017-01-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.9.0</li>
+      
+                                            <li class="divider pull-right">|</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="span3">
+          <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">
+          <i class="none"></i>
+        Option 1: using NCService</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../install.html" title="Option 2: using Managix">
+          <i class="none"></i>
+        Option 2: using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Option 3: using YARN">
+          <i class="none"></i>
+        Option 3: using YARN</a>
+            </li>
+                              <li class="nav-header">AsterixDB Primer</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/primer-sqlpp.html" title="Option 1: using SQL++">
+          <i class="none"></i>
+        Option 1: using SQL++</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="Option 2: using AQL">
+          <i class="none"></i>
+        Option 2: using AQL</a>
+            </li>
+                              <li class="nav-header">Data Model</li>
+                                
+      <li>
+    
+                          <a href="../datamodel.html" title="The Asterix Data Model">
+          <i class="none"></i>
+        The Asterix Data Model</a>
+            </li>
+                              <li class="nav-header">Queries - SQL++</li>
+                                
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>The SQL++ Query Language</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../sqlpp/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Queries - AQL</li>
+                                
+      <li>
+    
+                          <a href="../aql/manual.html" title="The Asterix Query Language (AQL)">
+          <i class="none"></i>
+        The Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Advanced Features</li>
+                                
+      <li>
+    
+                          <a href="../aql/similarity.html" title="Support of Similarity Queries">
+          <i class="none"></i>
+        Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/fulltext.html" title="Support of Full-text Queries">
+          <i class="none"></i>
+        Support of Full-text Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion">
+          <i class="none"></i>
+        Support for Data Ingestion</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="User Defined Functions">
+          <i class="none"></i>
+        User Defined Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                              <li class="nav-header">API/SDK</li>
+                                
+      <li>
+    
+                          <a href="../api.html" title="HTTP API">
+          <i class="none"></i>
+        HTTP API</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <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="span9" >
+                                  
+            <!-- ! 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>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<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="#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="#Abbreviatory_field_access_expressions">Abbreviatory 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 clauases 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="#Parsing_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="#Declarations">Declarations</a></li>
+    
+<li><a href="#Lifecycle_management_statements">Lifecycle management statements</a>
+    
+<ul>
+      
+<li><a href="#Dataverses">Dataverses</a></li>
+      
+<li><a href="#Datasets">Datasets</a></li>
+      
+<li><a href="#Types">Types</a></li>
+      
+<li><a href="#Functions">Functions</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>
+</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>
+
+<div class="source">
+<div class="source">
+<pre>Expression ::= OperatorExpression | CaseExpression | QuantifiedExpression
+</pre></div></div>
+<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>
+<p>Note that in the following text, words enclosed in angle brackets denote keywords that are not case-sensitive.</p></div>
+<div class="section">
+<h2><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 class="source">
+<div class="source">
+<pre>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</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;=, 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 encolosing 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" id="Arithmetic_operators">Arithmetic operators</a></h3>
+<p>Arithemtic 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 </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" 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" 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>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; </td>
+      
+<td>Less than </td>
+      
+<td>SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&lt;10; </td>
+    </tr>
+    
+<tr class="b">
+      
+<td>&gt; </td>
+      
+<td>Greater than </td>
+      
+<td>SELECT * FROM ChirpMessages cm <br />WHERE cm.chirpId&gt;10; </td>
+    </tr>
+    
+<tr class="a">
+      
+<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="b">
+      
+<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="a">
+      
+<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="b">
+      
+<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>
+  </tbody>
+</table></div></div></div>
+<div class="section">
+<h3><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" id="Case_expressions">Case expressions</a></h2>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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" id="Quantified_expressions">Quantified expressions</a></h2>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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" id="Path_expressions">Path expressions</a></h2>
+
+<div class="source">
+<div class="source">
+<pre>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, e.g., 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 class="source">
+<div class="source">
+<pre>({&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 class="source">
+<div class="source">
+<pre>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 class="section">
+<h3><a name="Literals" id="Literals">Literals</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>'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 class="source">
+<div class="source">
+<pre>VariableReference     ::= &lt;IDENTIFIER&gt;|&lt;DelimitedIdentifier&gt;
+&lt;IDENTIFIER&gt;          ::= &lt;LETTER&gt; (&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, e.g., `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.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Examples"></a>Examples</h5>
+
+<div class="source">
+<div class="source">
+<pre>tweet
+id
+`SELECT`
+`my-function`
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Parenthesized_expressions" id="Parenthesized_expressions">Parenthesized expressions</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>( 1 + 1 )
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Function_call_expressions" id="Function_call_expressions">Function call expressions</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>length('a string')
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><a name="Constructors" id="Constructors">Constructors</a></h3>
+
+<div class="source">
+<div class="source">
+<pre>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, a new object with 2 fields, and a new multiset with 5 items, respectively. Array elements or multiset elements can be homogeneous (as in the first example), which is the common case, or they may be heterogeneous (as in the third 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 a record must be 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 class="source">
+<div class="source">
+<pre>[ 'a', 'b', 'c', 'c' ]
+
+{
+  'project name': 'Hyracks',
+  'project members': [ 'vinayakb', 'dtabass', 'chenli', 'tsotras', 'tillw' ]
+}
+
+{{ 42, &quot;forty-two!&quot;, { &quot;rank&quot;: &quot;Captain&quot;, &quot;name&quot;: &quot;America&quot; }, 3.14159, 42 }}
+</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 class="source">
+<div class="source">
+<pre>Query ::= (Expression | SelectStatement) &quot;;&quot;
+</pre></div></div></div></div></div></div>
+<div class="section">
+<h2><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 class="source">
+<div class="source">
+<pre>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; | &lt;CORRELATE&gt; | &lt;FLATTEN&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; Variable &lt;AS&gt; VariableReference (&quot;,&quot; Variable &lt;AS&gt; VariableReference )* &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 class="source">
+<div class="source">
+<pre>{&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 class="source">
+<div class="source">
+<pre>{&quot;messageId&quot;:2,&quot;authorId&quot;:1,&quot;inResponseTo&quot;:4,&quot;senderLocation&quot;:[41.66,80.87],&quot;message&quot;:&quot; dislike iphone 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 samsung 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 at&amp;t 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 t-mobile 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 verizon 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 motorola 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 at&amp;t 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_VALUE_Clause"></a><a name="Select_element" id="Select_element">SELECT VALUE Clause</a></h3>
+<p>The <tt>SELECT VALUE</tt> clause in SQL++ returns a collection 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>The following example shows a standard-alone <tt>SELECT VALUE</tt>, which wraps a value into an array.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT VALUE 1;
+</pre></div></div>
+<p>This query return:</p>
+
+<div class="source">
+<div class="source">
+<pre>[
+  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 class="source">
+<div class="source">
+<pre>SELECT VALUE user
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+<p>This query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[{
+    &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 class="source">
+<div class="source">
+<pre>SELECT user.alias user_alias, user.name user_name
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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_"></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>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 variable generated in the <tt>FROM</tt> clause, this query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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 t-mobile 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 samsung 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 class="source">
+<div class="source">
+<pre>SELECT DISTINCT * FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+<p>This query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>SELECT DISTINCT VALUE foo FROM [1, 2, 2, 3] AS foo;
+</pre></div></div>
+<p>This version of the query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ 1
+, 2
+, 3
+ ]
+</pre></div></div></div></div></div>
+<div class="section">
+<h3><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 class="source">
+<div class="source">
+<pre>SELECT substr(user.name, 10), user.alias
+FROM GleambookUsers user
+WHERE user.id = 1;
+</pre></div></div>
+<p>This query outputs:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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="Abbreviatory_field_access_expressions" id="Abbreviatory_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.</p>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT substr(name, 10) AS lname, alias
+FROM GleambookUsers user
+WHERE id = 1;
+</pre></div></div>
+<p>Outputs:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like samsung 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>SELECT VALUE foo
+FROM [1, 2, 2, 3] AS foo
+WHERE foo &gt; 2;
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[
+  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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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" 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 class="source">
+<div class="source">
+<pre>SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers, GleambookMessages
+WHERE GleambookMessages.authorId = GleambookUsers.id;
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>[ {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot;
+}, {
+    &quot;name&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like samsung the plan is amazing&quot;
+}, {
+    &quot;name&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like t-mobile its platform is mind-blowing&quot;
+} ]
+</pre></div></div></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT GleambookUsers.name, GleambookMessages.message
+FROM GleambookUsers,
+  (
+    SELECT VALUE GleambookMessages
+    FROM GleambookMessages
+    WHERE GleambookMessages.authorId = GleambookUsers.id
+  );
+</pre></div></div>
+<p>Returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>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></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 class="source">
+<div class="source">
+<pre>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" 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; like verizon the 3G is awesome:)&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand motorola the touch-screen is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t its plan is terrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; dislike iphone its touch-screen is horrible&quot;
+}, {
+    &quot;uname&quot;: &quot;MargaritaStoddard&quot;,
+    &quot;message&quot;: &quot; can't stand at&amp;t the network is horrible:(&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like samsung the plan is amazing&quot;
+}, {
+    &quot;uname&quot;: &quot;IsbelDull&quot;,
+    &quot;message&quot;: &quot; like t-mobile 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>&lt;GROUP&gt; &lt;AS&gt; Variable (&quot;(&quot; Variable &lt;AS&gt; VariableReference (&quot;,&quot; Variable &lt;AS&gt; VariableReference )* &quot;)&quot;)?
+</pre></div></div>
+<div class="section">
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>[ {
+    &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 at&amp;t 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 iphone 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 at&amp;t 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 verizon 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 motorola 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 t-mobile its platform is mind-blowing&quot;
+            }
+        },
+        {
+            &quot;msg&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 samsung the plan is amazing&quot;
+            }
+        }
+    ],
+    &quot;uid&quot;: 2
+} ]
+</pre></div></div>
+<p>As we can see from the above query result, each group in the example query&#x2019;s output has an associated group variable value called <tt>msgs</tt> that appears in the <tt>SELECT *</tt>&#x2019;s result. This variable contains a collection of objects associated with the group; each of the group&#x2019;s <tt>message</tt> values appears in the <tt>msg</tt> field of the objects in the <tt>msgs</tt> collection.</p>
+<p>The group variable in SQL++ makes more complex, composable, nested subqueries over a group possible, which is important given the more complex data model of SQL++ (relative to SQL). As a simple example of this, as we really just want the messages associated with each user, we might wish to avoid the &#x201c;extra wrapping&#x201d; of each message as the <tt>msg</tt> field of a object. (That wrapping is useful in more complex cases, but is essentially just in the way here.) We can use a subquery in the <tt>SELECT</tt> clase to tunnel through the extra nesting and produce the desired result.</p></div>
+<div class="section">
+<h5><a name="Example"></a>Example</h5>
+
+<div class="source">
+<div class="source">
+<pre>SELECT uid, (SELECT VALUE g.msg FROM g) AS msgs
+FROM GleambookMessages gbm
+GROUP BY gbm.authorId AS uid
+GROUP AS g(gbm as msg);
+</pre></div></div>
+<p>This variant of the example query returns:</p>
+
+<div class="source">
+<div class="source">
+<pre>   [ {
+       &quot;msgs&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 at&amp;t its plan is terrible&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 iphone its touch-screen is horrible&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 at&amp;t the network is horrible:(&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 verizon the 3

<TRUNCATED>

[10/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/aql/builtins.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/aql/builtins.html b/content/docs/0.9.0/aql/builtins.html
new file mode 100644
index 0000000..1eb5137
--- /dev/null
+++ b/content/docs/0.9.0/aql/builtins.html
@@ -0,0 +1,8493 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-01-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<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="20170125" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Builtin Functions</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.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.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</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: 2017-01-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.9.0</li>
+      
+                                            <li class="divider pull-right">|</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="span3">
+          <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">
+          <i class="none"></i>
+        Option 1: using NCService</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../install.html" title="Option 2: using Managix">
+          <i class="none"></i>
+        Option 2: using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Option 3: using YARN">
+          <i class="none"></i>
+        Option 3: using YARN</a>
+            </li>
+                              <li class="nav-header">AsterixDB Primer</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/primer-sqlpp.html" title="Option 1: using SQL++">
+          <i class="none"></i>
+        Option 1: using SQL++</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="Option 2: using AQL">
+          <i class="none"></i>
+        Option 2: using AQL</a>
+            </li>
+                              <li class="nav-header">Data Model</li>
+                                
+      <li>
+    
+                          <a href="../datamodel.html" title="The Asterix Data Model">
+          <i class="none"></i>
+        The Asterix Data Model</a>
+            </li>
+                              <li class="nav-header">Queries - SQL++</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/manual.html" title="The SQL++ Query Language">
+          <i class="none"></i>
+        The SQL++ Query Language</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../sqlpp/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Queries - AQL</li>
+                                
+      <li>
+    
+                          <a href="../aql/manual.html" title="The Asterix Query Language (AQL)">
+          <i class="none"></i>
+        The Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Builtin Functions</a>
+          </li>
+                              <li class="nav-header">Advanced Features</li>
+                                
+      <li>
+    
+                          <a href="../aql/similarity.html" title="Support of Similarity Queries">
+          <i class="none"></i>
+        Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/fulltext.html" title="Support of Full-text Queries">
+          <i class="none"></i>
+        Support of Full-text Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion">
+          <i class="none"></i>
+        Support for Data Ingestion</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="User Defined Functions">
+          <i class="none"></i>
+        User Defined Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                              <li class="nav-header">API/SDK</li>
+                                
+      <li>
+    
+                          <a href="../api.html" title="HTTP API">
+          <i class="none"></i>
+        HTTP API</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <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="span9" >
+                                  
+            <!-- ! 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="#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. <!-- ! 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></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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 1.5707963267948966, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2.718281828459045, &quot;v2&quot;: 7.38905609893065, &quot;v3&quot;: 1.0, &quot;v4&quot;: 1.6487212707001282, &quot;v5&quot;: Infinity }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="floor"></a>floor</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.6931471805599453, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.3010299956639812, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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="round_half_to_even"></a>round_half_to_even</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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></div>
+<div class="section">
+<h3><a name="sign"></a>sign</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+<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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>concat(&quot;test &quot;, &quot;driven &quot;, &quot;development&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: contains(&quot;I like iphone&quot;, &quot;phone&quot;), &quot;v2&quot;: contains(&quot;one&quot;, &quot;phone&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: ends_with(&quot; love sprint its shortcut_menu is awesome:)&quot;, &quot;:)&quot;),
+  &quot;v2&quot;: ends_with(&quot; awsome:)&quot;, &quot;:-)&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="initcap_or_title"></a>initcap (or title)</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: initcap(&quot;ASTERIXDB is here!&quot;), &quot;v2&quot;: title(&quot;ASTERIXDB is here!&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>length(&quot;test string&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>11
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="lower"></a>lower</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>lower(&quot;ASTERIXDB&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ltrim(&quot;me like iphone&quot;, &quot;eml&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; like iphone&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="position"></a>position</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: position(&quot;ppphonepp&quot;, &quot;phone&quot;),
+  &quot;v2&quot;: position(&quot;hone&quot;, &quot;phone&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: regexp_like(&quot; can't stand at&amp;t the network is horrible:(&quot;, &quot;.*at&amp;t.*&quot;),
+  &quot;v2&quot;: regexp_like(&quot;at&amp;t&quot;, &quot;.*att.*&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0, &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 class="source">
+<div class="source">
+<pre>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 replace 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 class="source">
+<div class="source">
+<pre>regexp_replace(&quot; like iphone the voicemail_service is awesome&quot;, &quot; like iphone&quot;, &quot;like android&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;like android 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 class="source">
+<div class="source">
+<pre>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>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>.</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 class="source">
+<div class="source">
+<pre>repeat(&quot;test&quot;, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;testtesttest&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="rtrim"></a>rtrim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: rtrim(&quot;i like iphone&quot;, &quot;iphone&quot;),
+  &quot;v2&quot;: rtrim(&quot;i like iphone&quot;, &quot;oneiph&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>split(&quot;test driven development&quot;, &quot; &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string_concat"></a>string_concat</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_concat([&quot;ASTERIX&quot;, &quot; &quot;, &quot;ROCKS!&quot;]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_join([&quot;ASTERIX&quot;, &quot;ROCKS~&quot;], &quot;!! &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_to_codepoint(&quot;Hello ASTERIX!&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>codepoint_to_string([72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;Hello ASTERIX!&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substr"></a>substr</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>substr(&quot;test string&quot;, 6, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;str&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>substring_before(&quot; like iphone&quot;, &quot;iphone&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring_after(&quot; like iphone&quot;, &quot;iph&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;one&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="trim"></a>trim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>trim(&quot;i like iphone&quot;, &quot;iphoen&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>upper(&quot;hello&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+<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 class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>sub_binary(hex(&quot;AABBCCDD&quot;), 4);
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: create_point(30.0,70.0) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;line&quot;: create_line(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;rectangle&quot;: create_rectangle(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>create_circle(point, radius)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>circle</tt>

<TRUNCATED>

[08/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/content/docs/0.9.0/sqlpp/builtins.html
----------------------------------------------------------------------
diff --git a/content/docs/0.9.0/sqlpp/builtins.html b/content/docs/0.9.0/sqlpp/builtins.html
new file mode 100644
index 0000000..8e368ac
--- /dev/null
+++ b/content/docs/0.9.0/sqlpp/builtins.html
@@ -0,0 +1,8494 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-01-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<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="20170125" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Builtin Functions</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.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.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</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: 2017-01-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.9.0</li>
+      
+                                            <li class="divider pull-right">|</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="span3">
+          <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">
+          <i class="none"></i>
+        Option 1: using NCService</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../install.html" title="Option 2: using Managix">
+          <i class="none"></i>
+        Option 2: using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Option 3: using YARN">
+          <i class="none"></i>
+        Option 3: using YARN</a>
+            </li>
+                              <li class="nav-header">AsterixDB Primer</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/primer-sqlpp.html" title="Option 1: using SQL++">
+          <i class="none"></i>
+        Option 1: using SQL++</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="Option 2: using AQL">
+          <i class="none"></i>
+        Option 2: using AQL</a>
+            </li>
+                              <li class="nav-header">Data Model</li>
+                                
+      <li>
+    
+                          <a href="../datamodel.html" title="The Asterix Data Model">
+          <i class="none"></i>
+        The Asterix Data Model</a>
+            </li>
+                              <li class="nav-header">Queries - SQL++</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/manual.html" title="The SQL++ Query Language">
+          <i class="none"></i>
+        The SQL++ Query Language</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Builtin Functions</a>
+          </li>
+                              <li class="nav-header">Queries - AQL</li>
+                                
+      <li>
+    
+                          <a href="../aql/manual.html" title="The Asterix Query Language (AQL)">
+          <i class="none"></i>
+        The Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Advanced Features</li>
+                                
+      <li>
+    
+                          <a href="../aql/similarity.html" title="Support of Similarity Queries">
+          <i class="none"></i>
+        Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/fulltext.html" title="Support of Full-text Queries">
+          <i class="none"></i>
+        Support of Full-text Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion">
+          <i class="none"></i>
+        Support for Data Ingestion</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="User Defined Functions">
+          <i class="none"></i>
+        User Defined Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                              <li class="nav-header">API/SDK</li>
+                                
+      <li>
+    
+                          <a href="../api.html" title="HTTP API">
+          <i class="none"></i>
+        HTTP API</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <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="span9" >
+                                  
+            <!-- ! 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="#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. <!-- ! 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></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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 1.5707963267948966, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2.718281828459045, &quot;v2&quot;: 7.38905609893065, &quot;v3&quot;: 1.0, &quot;v4&quot;: 1.6487212707001282, &quot;v5&quot;: Infinity }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="floor"></a>floor</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.6931471805599453, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.3010299956639812, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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="round_half_to_even"></a>round_half_to_even</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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></div>
+<div class="section">
+<h3><a name="sign"></a>sign</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+<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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>concat(&quot;test &quot;, &quot;driven &quot;, &quot;development&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: contains(&quot;I like iphone&quot;, &quot;phone&quot;), &quot;v2&quot;: contains(&quot;one&quot;, &quot;phone&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: ends_with(&quot; love sprint its shortcut_menu is awesome:)&quot;, &quot;:)&quot;),
+  &quot;v2&quot;: ends_with(&quot; awsome:)&quot;, &quot;:-)&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="initcap_or_title"></a>initcap (or title)</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: initcap(&quot;ASTERIXDB is here!&quot;), &quot;v2&quot;: title(&quot;ASTERIXDB is here!&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>length(&quot;test string&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>11
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="lower"></a>lower</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>lower(&quot;ASTERIXDB&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ltrim(&quot;me like iphone&quot;, &quot;eml&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; like iphone&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="position"></a>position</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: position(&quot;ppphonepp&quot;, &quot;phone&quot;),
+  &quot;v2&quot;: position(&quot;hone&quot;, &quot;phone&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: regexp_like(&quot; can't stand at&amp;t the network is horrible:(&quot;, &quot;.*at&amp;t.*&quot;),
+  &quot;v2&quot;: regexp_like(&quot;at&amp;t&quot;, &quot;.*att.*&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0, &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 class="source">
+<div class="source">
+<pre>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 replace 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 class="source">
+<div class="source">
+<pre>regexp_replace(&quot; like iphone the voicemail_service is awesome&quot;, &quot; like iphone&quot;, &quot;like android&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;like android 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 class="source">
+<div class="source">
+<pre>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>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>.</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 class="source">
+<div class="source">
+<pre>repeat(&quot;test&quot;, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;testtesttest&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="rtrim"></a>rtrim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: rtrim(&quot;i like iphone&quot;, &quot;iphone&quot;),
+  &quot;v2&quot;: rtrim(&quot;i like iphone&quot;, &quot;oneiph&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>split(&quot;test driven development&quot;, &quot; &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string_concat"></a>string_concat</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_concat([&quot;ASTERIX&quot;, &quot; &quot;, &quot;ROCKS!&quot;]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_join([&quot;ASTERIX&quot;, &quot;ROCKS~&quot;], &quot;!! &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_to_codepoint(&quot;Hello ASTERIX!&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>codepoint_to_string([72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;Hello ASTERIX!&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substr"></a>substr</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>substr(&quot;test string&quot;, 6, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;str&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>substring_before(&quot; like iphone&quot;, &quot;iphone&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring_after(&quot; like iphone&quot;, &quot;iph&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;one&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="trim"></a>trim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>trim(&quot;i like iphone&quot;, &quot;iphoen&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>upper(&quot;hello&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+<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 class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>sub_binary(hex(&quot;AABBCCDD&quot;), 4);
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: create_point(30.0,70.0) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;line&quot;: create_line(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;rectangle&quot;: create_rectangle(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>create_circle(point, radius)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>circl

<TRUNCATED>

[03/11] asterixdb-site git commit: fix SQLPP/AQL function docs

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-site/blob/d5b11d83/docs/0.9.0/sqlpp/builtins.html
----------------------------------------------------------------------
diff --git a/docs/0.9.0/sqlpp/builtins.html b/docs/0.9.0/sqlpp/builtins.html
new file mode 100644
index 0000000..8e368ac
--- /dev/null
+++ b/docs/0.9.0/sqlpp/builtins.html
@@ -0,0 +1,8494 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2017-01-25
+ | Rendered using Apache Maven Fluido Skin 1.3.0
+-->
+<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="20170125" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Builtin Functions</title>
+    <link rel="stylesheet" href="../css/apache-maven-fluido-1.3.0.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.3.0.min.js"></script>
+
+                          
+        
+<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+        ga('create', 'UA-41536543-1', 'uci.edu');
+        ga('send', 'pageview');</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: 2017-01-25</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.9.0</li>
+      
+                                            <li class="divider pull-right">|</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="span3">
+          <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">
+          <i class="none"></i>
+        Option 1: using NCService</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../install.html" title="Option 2: using Managix">
+          <i class="none"></i>
+        Option 2: using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Option 3: using YARN">
+          <i class="none"></i>
+        Option 3: using YARN</a>
+            </li>
+                              <li class="nav-header">AsterixDB Primer</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/primer-sqlpp.html" title="Option 1: using SQL++">
+          <i class="none"></i>
+        Option 1: using SQL++</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="Option 2: using AQL">
+          <i class="none"></i>
+        Option 2: using AQL</a>
+            </li>
+                              <li class="nav-header">Data Model</li>
+                                
+      <li>
+    
+                          <a href="../datamodel.html" title="The Asterix Data Model">
+          <i class="none"></i>
+        The Asterix Data Model</a>
+            </li>
+                              <li class="nav-header">Queries - SQL++</li>
+                                
+      <li>
+    
+                          <a href="../sqlpp/manual.html" title="The SQL++ Query Language">
+          <i class="none"></i>
+        The SQL++ Query Language</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Builtin Functions</a>
+          </li>
+                              <li class="nav-header">Queries - AQL</li>
+                                
+      <li>
+    
+                          <a href="../aql/manual.html" title="The Asterix Query Language (AQL)">
+          <i class="none"></i>
+        The Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/builtins.html" title="Builtin Functions">
+          <i class="none"></i>
+        Builtin Functions</a>
+            </li>
+                              <li class="nav-header">Advanced Features</li>
+                                
+      <li>
+    
+                          <a href="../aql/similarity.html" title="Support of Similarity Queries">
+          <i class="none"></i>
+        Support of Similarity Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/fulltext.html" title="Support of Full-text Queries">
+          <i class="none"></i>
+        Support of Full-text Queries</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/externaldata.html" title="Accessing External Data">
+          <i class="none"></i>
+        Accessing External Data</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../feeds/tutorial.html" title="Support for Data Ingestion">
+          <i class="none"></i>
+        Support for Data Ingestion</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="User Defined Functions">
+          <i class="none"></i>
+        User Defined Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/filters.html" title="Filter-Based LSM Index Acceleration">
+          <i class="none"></i>
+        Filter-Based LSM Index Acceleration</a>
+            </li>
+                              <li class="nav-header">API/SDK</li>
+                                
+      <li>
+    
+                          <a href="../api.html" title="HTTP API">
+          <i class="none"></i>
+        HTTP API</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <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="span9" >
+                                  
+            <!-- ! 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="#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. <!-- ! 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></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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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>NaN for other legitimate numeric values.</li>
+  </ul></li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 1.5707963267948966, &quot;v2&quot;: NaN, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2.718281828459045, &quot;v2&quot;: 7.38905609893065, &quot;v3&quot;: 1.0, &quot;v4&quot;: 1.6487212707001282, &quot;v5&quot;: Infinity }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="floor"></a>floor</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.6931471805599453, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0.0, &quot;v2&quot;: 0.3010299956639812, &quot;v3&quot;: -Infinity, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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="round_half_to_even"></a>round_half_to_even</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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></div>
+<div class="section">
+<h3><a name="sign"></a>sign</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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>
+<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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>concat(&quot;test &quot;, &quot;driven &quot;, &quot;development&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: contains(&quot;I like iphone&quot;, &quot;phone&quot;), &quot;v2&quot;: contains(&quot;one&quot;, &quot;phone&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: ends_with(&quot; love sprint its shortcut_menu is awesome:)&quot;, &quot;:)&quot;),
+  &quot;v2&quot;: ends_with(&quot; awsome:)&quot;, &quot;:-)&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="initcap_or_title"></a>initcap (or title)</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: initcap(&quot;ASTERIXDB is here!&quot;), &quot;v2&quot;: title(&quot;ASTERIXDB is here!&quot;) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>length(&quot;test string&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>11
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="lower"></a>lower</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>lower(&quot;ASTERIXDB&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>ltrim(&quot;me like iphone&quot;, &quot;eml&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot; like iphone&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="position"></a>position</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: position(&quot;ppphonepp&quot;, &quot;phone&quot;),
+  &quot;v2&quot;: position(&quot;hone&quot;, &quot;phone&quot;)
+};
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 2, &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: regexp_like(&quot; can't stand at&amp;t the network is horrible:(&quot;, &quot;.*at&amp;t.*&quot;),
+  &quot;v2&quot;: regexp_like(&quot;at&amp;t&quot;, &quot;.*att.*&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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>,  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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: 0, &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 class="source">
+<div class="source">
+<pre>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 replace 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 class="source">
+<div class="source">
+<pre>regexp_replace(&quot; like iphone the voicemail_service is awesome&quot;, &quot; like iphone&quot;, &quot;like android&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;like android 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 class="source">
+<div class="source">
+<pre>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>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>.</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 class="source">
+<div class="source">
+<pre>repeat(&quot;test&quot;, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;testtesttest&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="rtrim"></a>rtrim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{
+  &quot;v1&quot;: rtrim(&quot;i like iphone&quot;, &quot;iphone&quot;),
+  &quot;v2&quot;: rtrim(&quot;i like iphone&quot;, &quot;oneiph&quot;)
+};
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>split(&quot;test driven development&quot;, &quot; &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{
+  &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>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: true, &quot;v2&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="string_concat"></a>string_concat</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_concat([&quot;ASTERIX&quot;, &quot; &quot;, &quot;ROCKS!&quot;]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_join([&quot;ASTERIX&quot;, &quot;ROCKS~&quot;], &quot;!! &quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>string_to_codepoint(&quot;Hello ASTERIX!&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>codepoint_to_string([72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33]);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;Hello ASTERIX!&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="substr"></a>substr</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>substr(&quot;test string&quot;, 6, 3);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;str&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>substring_before(&quot; like iphone&quot;, &quot;iphone&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>substring_after(&quot; like iphone&quot;, &quot;iph&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&quot;one&quot;
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="trim"></a>trim</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>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>
+</ul>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>trim(&quot;i like iphone&quot;, &quot;iphoen&quot;);
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>upper(&quot;hello&quot;)
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>&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>
+<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 class="source">
+<div class="source">
+<pre>[ 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 class="source">
+<div class="source">
+<pre>[ &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 class="source">
+<div class="source">
+<pre>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>,</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 class="source">
+<div class="source">
+<pre>sub_binary(hex(&quot;AABBCCDD&quot;), 4);
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is</p>
+  
+<div class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;point&quot;: create_point(30.0,70.0) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;line&quot;: create_line(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>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 class="source">
+<div class="source">
+<pre>{ &quot;rectangle&quot;: create_rectangle(create_point(30.0,70.0), create_point(50.0,90.0)) };
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &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 class="source">
+<div class="source">
+<pre>create_circle(point, radius)
+</pre></div></div></li>
+  
+<li>
+<p>Creates the primitive type <tt>circle</tt> using <tt>point</tt> and 

<TRUNCATED>