asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject [15/30] incubator-asterixdb-site git commit: Include stable docs, use Apache URLs
Date Wed, 25 Nov 2015 19:30:14 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/e2b799e7/docs/0.8.7-incubating/api.html
----------------------------------------------------------------------
diff --git a/docs/0.8.7-incubating/api.html b/docs/0.8.7-incubating/api.html
new file mode 100644
index 0000000..72fd689
--- /dev/null
+++ b/docs/0.8.7-incubating/api.html
@@ -0,0 +1,606 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-11-24
+ | 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="20151124" />
+    <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" />
+    <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="http://asterixdb.apache.org/" 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: 2015-11-24</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.7-incubating</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">Documentation</li>
+                                
+      <li>
+    
+                          <a href="install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity 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 in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</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="active">
+    
+            <a href="#"><i class="none"></i>HTTP API to AsterixDB</a>
+          </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="images/hyrax_ts.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>HTTP API to AsterixDB</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="#DdlApi">DDL API</a></li>
+  
+<li><a href="#UpdateApi">Update API</a></li>
+  
+<li><a href="#QueryApi">Query API</a></li>
+  
+<li><a href="#AnyApi">Mixed API</a></li>
+  
+<li><a href="#AsynchronousResultApi">Asynchronous Result API</a></li>
+  
+<li><a href="#QueryStatusApi">Query Status API</a></li>
+  
+<li><a href="#ErrorCodes">Error Codes</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="DDL_API_Back_to_TOC"></a><a name="DdlApi" id="DdlApi">DDL API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for the data definition statements</i></p>
+<p>Endpoint: <i>/ddl</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>ddl</td>
+  
+<td>String containing DDL statements to modify Metadata</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>This call does not return any result. If the operations were successful, HTTP OK status code is returned.</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="DDL_Statements"></a>DDL Statements</h4>
+
+<div class="source">
+<div class="source">
+<pre>    drop dataverse company if exists;
+    create dataverse company;
+    use dataverse company;
+
+    create type Emp as open {
+      id : int32,
+      name : string
+    };
+
+    create dataset Employee(Emp) primary key id;
+</pre></div></div>
+<p>API call for the above DDL statements in the URL-encoded form.</p>
+<p>[http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;](<a class="externalLink" href="http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;">http://localhost:19002/ddl?ddl=drop%20dataverse%20company%20if%20exists;create%20dataverse%20company;use%20dataverse%20company;create%20type%20Emp%20as%20open%20{id%20:%20int32,name%20:%20string};create%20dataset%20Employee(Emp)%20primary%20key%20id;</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br /><tt>&lt;NO PAYLOAD&gt;</tt></p></div></div></div>
+<div class="section">
+<h2><a name="Update_API_Back_to_TOC"></a><a name="UpdateApi" id="UpdateApi">Update API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for update statements (INSERT, DELETE and LOAD)</i></p>
+<p>Endpoint: <i>/update</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>statements</td>
+  
+<td>String containing update (insert/delete) statements to execute</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>This call does not return any result. If the operations were successful, HTTP OK status code is returned.</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Update_Statements"></a>Update Statements</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse company;
+
+    insert into dataset Employee({ &quot;id&quot;:123,&quot;name&quot;:&quot;John Doe&quot;});
+</pre></div></div>
+<p>API call for the above update statement in the URL-encoded form.</p>
+<p>[http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});](<a class="externalLink" href="http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});">http://localhost:19002/update?statements=use%20dataverse%20company;insert%20into%20dataset%20Employee({%20%22id%22:123,%22name%22:%22John%20Doe%22});</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br /><tt>&lt;NO PAYLOAD&gt;</tt></p></div></div></div>
+<div class="section">
+<h2><a name="Query_API_Back_to_TOC"></a><a name="QueryApi" id="QueryApi">Query API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for query statements</i></p>
+<p>Endpoint: <i>/query</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>query</td>
+  
+<td>Query string to pass to ASTERIX for execution</td>
+  
+<td>Yes</td>
+</tr>
+
+<tr class="a">
+  
+<td>mode</td>
+  
+<td>Indicate if call should be synchronous or asynchronous. mode = synchronous blocks the call until results are available; mode = asynchronous returns immediately with a handle that can be used later to check the query&#x2019;s status and to fetch results when available</td>
+  
+<td>No. default mode = synchronous</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       results: &lt;result as a string, if mode = synchronous&gt;
+       error-code: [&lt;code&gt;, &lt;message&gt;] (if an error occurs)
+       handle: &lt;opaque result handle, if mode = asynchronous&gt;
+    }
+</pre></div></div>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Select_query_with_synchronous_result_delivery"></a>Select query with synchronous result delivery</h4>
+
+<div class="source">
+<div class="source">
+<pre>    use dataverse company;
+
+    for $l in dataset('Employee') return $l;
+</pre></div></div>
+<p>API call for the above query statement in the URL-encoded form.</p>
+<p>[http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&#x2018;Employee&#x2019;)%20return%20$l;](<a class="externalLink" href="http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&apos;Employee&apos;)%20return%20$l;">http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset('Employee')%20return%20$l;</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+      &quot;results&quot;: [
+          [
+              &quot;{ &quot;id&quot;: 123, &quot;name&quot;: &quot;John Doe&quot; }&quot;
+          ]
+      ]
+    }
+</pre></div></div></div>
+<div class="section">
+<h4><a name="Same_select_query_with_asynchronous_result_delivery"></a>Same select query with asynchronous result delivery</h4>
+<p>API call for the above query statement in the URL-encoded form with mode=asynchronous</p>
+<p>[http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&#x2018;Employee&#x2019;)%20return%20$l;&amp;mode=asynchronous](<a class="externalLink" href="http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset(&apos;Employee&apos;)%20return%20$l;&amp;mode=asynchronous">http://localhost:19002/query?query=use%20dataverse%20company;for%20$l%20in%20dataset('Employee')%20return%20$l;&amp;mode=asynchronous</a>)</p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+        &quot;handle&quot;: [45,0]
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Mixed_API_Back_to_TOC"></a><a name="AnyApi" id="AnyApi">Mixed API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point for any/mixed statement</i></p>
+<p>Endpoint: <i>/aql</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>query</td>
+  
+<td>Query string to pass to ASTERIX for execution</td>
+  
+<td>Yes</td>
+</tr>
+
+<tr class="a">
+  
+<td>mode</td>
+  
+<td>Indicate if call should be synchronous or asynchronous. mode = synchronous blocks the call until results are available; mode = asynchronous returns immediately with a handle that can be used later to check the query&#x2019;s status and to fetch results when available</td>
+  
+<td>No. default mode = synchronous</td>
+</tr>
+</table>
+<p>Similar to <i><i>/update</i></i> but allows any arbitrary AQL statement rather than only modifications.</p></div>
+<div class="section">
+<h2><a name="Asynchronous_Result_API_Back_to_TOC"></a><a name="AsynchronousResultApi" id="AsynchronousResultApi">Asynchronous Result API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point to fetch the results of an asynchronous query</i></p>
+<p>Endpoint: <i>/query/result</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>handle</td>
+  
+<td>Result handle that was returned by a previous call to a /query call with mode = asynchronous</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       results: &lt;result as a string, if mode = synchronous, or mode = asynchronous and results are available&gt;
+       error-code: [&lt;code&gt;, &lt;message&gt;] (if an error occurs)
+    }
+</pre></div></div>
+<p>If mode = asynchronous and results are not available, the returned JSON object is empty: { }</p>
+<div class="section">
+<h3><a name="Example"></a>Example</h3>
+<div class="section">
+<h4><a name="Fetching_results_for_asynchronous_query"></a>Fetching results for asynchronous query</h4>
+<p>We use the handle returned by the asynchronous query to get the results for the query. The handle returned was:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+        &quot;handle&quot;: [45,0]
+    }
+</pre></div></div>
+<p>API call for reading results from the previous asynchronous query in the URL-encoded form.</p>
+<p><a class="externalLink" href="http://localhost:19002/query/result?handle=%7B%22handle%22%3A+%5B45%2C+0%5D%7D">http://localhost:19002/query/result?handle=%7B%22handle%22%3A+%5B45%2C+0%5D%7D</a></p></div>
+<div class="section">
+<h4><a name="Response"></a>Response</h4>
+<p><i>HTTP OK 200</i><br />Payload</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+      &quot;results&quot;: [
+          [
+              &quot;{ &quot;id&quot;: 123, &quot;name&quot;: &quot;John Doe&quot; }&quot;
+          ]
+      ]
+    }
+</pre></div></div></div></div></div>
+<div class="section">
+<h2><a name="Query_Status_API_Back_to_TOC"></a><a name="QueryStatusApi" id="QueryStatusApi">Query Status API</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p><i>End point to check the status of the query asynchronous</i></p>
+<p>Endpoint: <i>/query/status</i></p>
+<p>Parameters:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Parameter</td>
+  
+<td>Description</td>
+  
+<td>Required?</td>
+</tr>
+
+<tr class="b">
+  
+<td>handle</td>
+  
+<td>Result handle that was returned by a previous call to a /query call with mode = asynchronous</td>
+  
+<td>Yes</td>
+</tr>
+</table>
+<p>Result: The result is returned as a JSON object as follows:</p>
+
+<div class="source">
+<div class="source">
+<pre>    {
+       status: (&quot;RUNNING&quot; | &quot;SUCCESS&quot; | &quot;ERROR&quot;)
+    }
+</pre></div></div></div>
+<div class="section">
+<h2><a name="Error_Codes_Back_to_TOC"></a><a name="ErrorCodes" id="ErrorCodes">Error Codes</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>Table of error codes and their types:</p>
+
+<table border="0" class="table table-striped">
+
+<tr class="a">
+  
+<td>Code</td>
+  
+<td>Type</td>
+</tr>
+
+<tr class="b">
+  
+<td>1</td>
+  
+<td>Invalid statement</td>
+</tr>
+
+<tr class="a">
+  
+<td>2</td>
+  
+<td>Parse failures</td>
+</tr>
+
+<tr class="b">
+  
+<td>99</td>
+  
+<td>Uncategorized error</td>
+</tr>
+</table></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/e2b799e7/docs/0.8.7-incubating/aql/allens.html
----------------------------------------------------------------------
diff --git a/docs/0.8.7-incubating/aql/allens.html b/docs/0.8.7-incubating/aql/allens.html
new file mode 100644
index 0000000..ec566c2
--- /dev/null
+++ b/docs/0.8.7-incubating/aql/allens.html
@@ -0,0 +1,660 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-11-24
+ | 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="20151124" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; AsterixDB Temporal Functions: Allens Relations</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="http://asterixdb.apache.org/" 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: 2015-11-24</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.7-incubating</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">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/datamodel.html" title="Asterix Data Model (ADM)">
+          <i class="none"></i>
+        Asterix Data Model (ADM)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>AQL Allen's Relations Functions</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity 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 in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</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>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.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>AsterixDB Temporal Functions: Allen&#x2019;s Relations</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="#AboutAllensRelations">About Allen&#x2019;s Relations</a></li>
+  
+<li><a href="#AllensRelatonsFunctions">Allen&#x2019;s Relations Functions</a></li>
+</ul></div>
+<div class="section">
+<h2><a name="About_Allens_Relations_Back_to_TOC"></a><a name="AboutAllensRelations" id="AboutAllensRelations">About Allen&#x2019;s Relations</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<p>AsterixDB supports Allen&#x2019;s relations over interval types. Allen&#x2019;s relations are also called Allen&#x2019;s interval algebra. There are totally 13 base relations described by this algebra, and all of them are supported in AsterixDB (note that <tt>interval-equals</tt> is supported by the <tt>=</tt> comparison symbol so there is no extra function for it). </p>
+<p>A detailed description of Allen&#x2019;s relations can be found from its <a class="externalLink" href="http://en.wikipedia.org/wiki/Allen&apos;s_interval_algebra">wikipedia entry</a>. </p></div>
+<div class="section">
+<h2><a name="Allens_Relations_Functions_Back_to_TOC"></a><a name="AllensRelatonsFunctions" id="AllensRelatonsFunctions">Allen&#x2019;s Relations Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="interval-before_interval-after"></a>interval-before, interval-after</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-before(interval1, interval2)
+interval-after(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether an interval happens before/after another interval. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-before(interval1, interval2)</tt> is true if and only if <tt>interval1.end &lt; interval2.start</tt>, and <tt>interval-after(interval1, interval2)</tt> is true if and only if <tt>interval1.start &gt; interval2.end</tt>. If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2005-05-01&quot;, &quot;2012-09-09&quot;)
+return {&quot;interval-before&quot;: interval-before($itv1, $itv2), &quot;interval-after&quot;: interval-after($itv2, $itv1)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-before&quot;: true, &quot;interval-after&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-covers_interval-covered-by"></a>interval-covers, interval-covered-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-covers(interval1, interval2)
+interval-covered-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval covers the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-covers(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start &lt;= interval2.start
+AND interval1.end &gt;= interval2.end
+</pre></div></div>
+<p><tt>interval-covered-by(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.start &lt;= interval1.start
+AND interval2.end &gt;= interval1.end
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2000-03-01&quot;, &quot;2004-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2012-08-01&quot;)
+return {&quot;interval-covers&quot;: interval-covers($itv1, $itv2), &quot;interval-covered-by&quot;: interval-covered-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-covers&quot;: true, &quot;interval-covered-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-overlaps_interval-overlapped-by"></a>interval-overlaps, interval-overlapped-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-overlaps(interval1, interval2)
+interval-overlapped-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These functions check whether two intervals overlap with each other.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-overlaps(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start &lt; interval2.start
+AND interval2.end &gt; interval1.end
+AND interval1.end &gt; interval2.start
+</pre></div></div>
+<p><tt>interval-overlapped-by(interval1, interval2)</tt> is true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.start &lt; interval1.start
+AND interval1.end &gt; interval2.end
+AND interval2.end &gt; interval1.start
+</pre></div></div>
+<p>For all these functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p>
+<p>Note that <tt>interval-overlaps</tt> and <tt>interval-overlapped-by</tt> are following the Allen&#x2019;s relations on the definition of overlap.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2004-05-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-12-31&quot;)
+return {&quot;overlaps&quot;: interval-overlaps($itv1, $itv2), 
+        &quot;overlapped-by&quot;: interval-overlapped-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;overlaps&quot;: true, &quot;overlapped-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-overlapping"></a>interval-overlapping</h3>
+<p>Note that <tt>interval-overlapping</tt> is not an Allen&#x2019;s Relation, but syntactic sugar we added for the case that the intersect of two intervals is not empty. Basically this function returns true if any of these functions return true: <tt>interval-overlaps</tt>, <tt>interval-overlapped-by</tt>, <tt>interval-covers</tt>, or <tt>interval-covered-by</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-overlapping(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>This functions check whether two intervals share any points with each other. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-overlapping(interval1, interval2)</tt> is true if</p>
+  
+<div class="source">
+<div class="source">
+<pre>(interval2.start &gt;= interval1.start
+AND interval2.start &lt; interval1.end)
+OR
+(interval2.end &gt; interval1.start
+AND interval2.end &lt;= interval1.end)
+</pre></div></div>
+<p>If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2004-05-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-12-31&quot;)
+return {&quot;overlapping1&quot;: interval-overlapping($itv1, $itv2), 
+        &quot;overlapping2&quot;: interval-overlapping($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;overlapping1&quot;: true, &quot;overlapping2&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-meets_interval-met-by"></a>interval-meets, interval-met-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-meets(interval1, interval2)
+interval-met-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether an interval meets with another interval. </p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-meets(interval1, interval2)</tt> is true if and only if <tt>interval1.end = interval2.start</tt>, and <tt>interval-met-by(interval1, interval2)</tt> is true if and only if <tt>interval1.start = interval2.end</tt>. If any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2005-01-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2004-09-10&quot;, &quot;2006-08-01&quot;)
+return {&quot;meets&quot;: interval-meets($itv1, $itv2), &quot;metby&quot;: interval-met-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;meets&quot;: true, &quot;metby&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-starts_interval-started-by"></a>interval-starts, interval-started-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-starts(interval1, interval2)
+interval-started-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval starts with the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-starts(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start = interval2.start
+AND interval1.end &lt;= interval2.end
+</pre></div></div>
+<p><tt>interval-started-by(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.start = interval2.start
+AND interval2.end &lt;= interval1.end
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;2000-01-01&quot;, &quot;2012-09-09&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2006-08-01&quot;, &quot;2006-08-01&quot;)
+return {&quot;interval-starts&quot;: interval-starts($itv1, $itv2), &quot;interval-started-by&quot;: interval-started-by($itv3, $itv4)}
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-starts&quot;: true, &quot;interval-started-by&quot;: true }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="interval-ends_interval-ended-by"></a>interval-ends, interval-ended-by</h3>
+
+<ul>
+  
+<li>
+<p>Syntax:</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval-ends(interval1, interval2)
+interval-ended-by(interval1, interval2)
+</pre></div></div></li>
+  
+<li>
+<p>These two functions check whether one interval ends with the other interval.</p></li>
+  
+<li>Arguments:
+  
+<ul>
+    
+<li><tt>interval1</tt>, <tt>interval2</tt>: two intervals to be compared</li>
+  </ul></li>
+  
+<li>
+<p>Return Value:</p>
+<p>A <tt>boolean</tt> value. Specifically, <tt>interval-ends(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval1.end = interval2.end
+AND interval1.start &gt;= interval2.start
+</pre></div></div>
+<p><tt>interval-ended-by(interval1, interval2)</tt> returns true if and only if</p>
+  
+<div class="source">
+<div class="source">
+<pre>interval2.end = interval1.end
+AND interval2.start &gt;= interval1.start
+</pre></div></div>
+<p>For both functions, if any of the two inputs is <tt>null</tt>, <tt>null</tt> is returned.</p></li>
+  
+<li>
+<p>Examples:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $itv1 := interval-from-date(&quot;2000-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv2 := interval-from-date(&quot;1998-01-01&quot;, &quot;2005-01-01&quot;)
+let $itv3 := interval-from-date(&quot;2006-08-01&quot;, &quot;2007-03-01&quot;)
+let $itv4 := interval-from-date(&quot;2006-09-10&quot;, &quot;2007-03-01&quot;)
+return {&quot;interval-ends&quot;: interval-ends($itv1, $itv2), &quot;interval-ended-by&quot;: interval-ended-by($itv3, $itv4) }
+</pre></div></div></li>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;interval-ends&quot;: true, &quot;interval-ended-by&quot;: true }
+</pre></div></div></li>
+</ul></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site/blob/e2b799e7/docs/0.8.7-incubating/aql/datamodel.html
----------------------------------------------------------------------
diff --git a/docs/0.8.7-incubating/aql/datamodel.html b/docs/0.8.7-incubating/aql/datamodel.html
new file mode 100644
index 0000000..7f756e6
--- /dev/null
+++ b/docs/0.8.7-incubating/aql/datamodel.html
@@ -0,0 +1,783 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-11-24
+ | 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="20151124" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>AsterixDB &#x2013; Asterix Data Model (ADM)</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="http://asterixdb.apache.org/" 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: 2015-11-24</li>
+                      
+                
+                    
+                 <li id="projectVersion" class="pull-right">Version: 0.8.7-incubating</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">Documentation</li>
+                                
+      <li>
+    
+                          <a href="../install.html" title="Installing and Managing AsterixDB using Managix">
+          <i class="none"></i>
+        Installing and Managing AsterixDB using Managix</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../yarn.html" title="Deploying AsterixDB using YARN">
+          <i class="none"></i>
+        Deploying AsterixDB using YARN</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer.html" title="AsterixDB 101: An ADM and AQL Primer">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/primer-sql-like.html" title="AsterixDB 101: An ADM and AQL Primer (For SQL Fans)">
+          <i class="none"></i>
+        AsterixDB 101: An ADM and AQL Primer (For SQL Fans)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/js-sdk.html" title="AsterixDB Javascript SDK">
+          <i class="none"></i>
+        AsterixDB Javascript SDK</a>
+            </li>
+                  
+      <li class="active">
+    
+            <a href="#"><i class="none"></i>Asterix Data Model (ADM)</a>
+          </li>
+                  
+      <li>
+    
+                          <a href="../aql/manual.html" title="Asterix Query Language (AQL)">
+          <i class="none"></i>
+        Asterix Query Language (AQL)</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/functions.html" title="AQL Functions">
+          <i class="none"></i>
+        AQL Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/allens.html" title="AQL Allen's Relations Functions">
+          <i class="none"></i>
+        AQL Allen's Relations Functions</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../aql/similarity.html" title="AQL Support of Similarity Queries">
+          <i class="none"></i>
+        AQL Support of Similarity 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 in AsterixDB">
+          <i class="none"></i>
+        Support for Data Ingestion in AsterixDB</a>
+            </li>
+                  
+      <li>
+    
+                          <a href="../udf.html" title="Support for User Defined Functions in AsterixDB">
+          <i class="none"></i>
+        Support for User Defined Functions in AsterixDB</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>
+    
+                          <a href="../api.html" title="HTTP API to AsterixDB">
+          <i class="none"></i>
+        HTTP API to AsterixDB</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr class="divider" />
+
+           <div id="poweredBy">
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                                                                                                                         <a href="https://code.google.com/p/hyracks/" title="Hyracks" class="builtBy">
+        <img class="builtBy"  alt="Hyracks" src="../images/hyrax_ts.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>Asterix Data Model (ADM)</h1>
+<div class="section">
+<h2><a name="Table_of_Contents"></a><a name="toc" id="toc">Table of Contents</a></h2>
+
+<ul>
+  
+<li><a href="#PrimitiveTypes">Primitive Types</a>
+  
+<ul>
+    
+<li><a href="#PrimitiveTypesBoolean">Boolean</a></li>
+    
+<li><a href="#PrimitiveTypesInt">Int8 / Int16 / Int32 / Int64</a></li>
+    
+<li><a href="#PrimitiveTypesFloat">Float</a></li>
+    
+<li><a href="#PrimitiveTypesDouble">Double</a></li>
+    
+<li><a href="#PrimitiveTypesString">String</a></li>
+    
+<li><a href="#PrimitiveTypesPoint">Point</a></li>
+    
+<li><a href="#PrimitiveTypesLine">Line</a></li>
+    
+<li><a href="#PrimitiveTypesRectangle">Rectangle</a></li>
+    
+<li><a href="#PrimitiveTypesCircle">Circle</a></li>
+    
+<li><a href="#PrimitiveTypesPolygon">Polygon</a></li>
+    
+<li><a href="#PrimitiveTypesDate">Date</a></li>
+    
+<li><a href="#PrimitiveTypesTime">Time</a></li>
+    
+<li><a href="#PrimitiveTypesDateTime">Datetime</a></li>
+    
+<li><a href="#PrimitiveTypesDuration">Duration/Year-month-duration/Day-time-duration</a></li>
+    
+<li><a href="#PrimitiveTypesInterval">Interval</a></li>
+    
+<li><a href="#PrimitiveTypesUUID">UUID</a></li>
+  </ul></li>
+  
+<li><a href="#DerivedTypes">Derived Types</a>
+  
+<ul>
+    
+<li><a href="#DerivedTypesRecord">Record</a></li>
+    
+<li><a href="#DerivedTypesOrderedList">OrderedList</a></li>
+    
+<li><a href="#DerivedTypesUnorderedList">UnorderedList</a></li>
+  </ul></li>
+</ul>
+<p>An instance of Asterix data model (ADM) can be a <i><i>primitive type</i></i> (<tt>int32</tt>, <tt>int64</tt>, <tt>string</tt>, <tt>float</tt>, <tt>double</tt>, <tt>date</tt>, <tt>time</tt>, <tt>datetime</tt>, etc. or <tt>null</tt>) or a <i><i>derived type</i></i>.</p></div>
+<div class="section">
+<h2><a name="Primitive_Types_Back_to_TOC"></a><a name="PrimitiveTypes" id="PrimitiveTypes">Primitive Types</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="BooleanBack_to_TOC"></a><a name="PrimitiveTypesBoolean" id="PrimitiveTypesBoolean">Boolean</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>boolean</tt> data type can have one of the two values: <i><i>true</i></i> or <i><i>false</i></i>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $t := true
+let $f := false
+return { &quot;true&quot;: $t, &quot;false&quot;: $f }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;true&quot;: true, &quot;false&quot;: false }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Int8__Int16__Int32__Int64_Back_to_TOC"></a><a name="PrimitiveTypesInt" id="PrimitiveTypesInt">Int8 / Int16 / Int32 / Int64</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>Integer types using 8, 16, 32, or 64 bits. The ranges of these types are:</p>
+
+<ul>
+  
+<li><tt>int8</tt>: -127 to 127</li>
+  
+<li><tt>int16</tt>: -32767 to 32767</li>
+  
+<li><tt>int32</tt>: -2147483647 to 2147483647</li>
+  
+<li><tt>int64</tt>: -9223372036854775808 to 9223372036854775807</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v8 := int8(&quot;125&quot;)
+let $v16 := int16(&quot;32765&quot;)
+let $v32 := 294967295
+let $v64 := int64(&quot;1700000000000000000&quot;)
+return { &quot;int8&quot;: $v8, &quot;int16&quot;: $v16, &quot;int32&quot;: $v32, &quot;int64&quot;: $v64}
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;int8&quot;: 125i8, &quot;int16&quot;: 32765i16, &quot;int32&quot;: 294967295, &quot;int64&quot;: 1700000000000000000i64 }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Float_Back_to_TOC"></a><a name="PrimitiveTypesFloat" id="PrimitiveTypesFloat">Float</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>float</tt> represents approximate numeric data values using 4 bytes. The range of a float value can be from 2^(-149) to (2-2^(-23)&#xb7;2^(127) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := float(&quot;NaN&quot;)
+let $v2 := float(&quot;INF&quot;)
+let $v3 := float(&quot;-INF&quot;)
+let $v4 := float(&quot;-2013.5&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: NaNf, &quot;v2&quot;: Infinityf, &quot;v3&quot;: -Infinityf, &quot;v4&quot;: -2013.5f }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Double_Back_to_TOC"></a><a name="PrimitiveTypesDouble" id="PrimitiveTypesDouble">Double</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>double</tt> represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))&#xb7;2^(1023) for both positive and negative. Beyond these ranges will get <tt>INF</tt> or <tt>-INF</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := double(&quot;NaN&quot;)
+let $v2 := double(&quot;INF&quot;)
+let $v3 := double(&quot;-INF&quot;)
+let $v4 := double(&quot;-2013.593823748327284&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3, &quot;v4&quot;: $v4 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: NaNd, &quot;v2&quot;: Infinityd, &quot;v3&quot;: -Infinityd, &quot;v4&quot;: -2013.5938237483274d }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="String_Back_to_TOC"></a><a name="PrimitiveTypesString" id="PrimitiveTypesString">String</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>string</tt> represents a sequence of characters.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := string(&quot;This is a string.&quot;)
+let $v2 := string(&quot;\&quot;This is a quoted string\&quot;&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: &quot;This is a string.&quot;, &quot;v2&quot;: &quot;\&quot;This is a quoted string\&quot;&quot; }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Point_Back_to_TOC"></a><a name="PrimitiveTypesPoint" id="PrimitiveTypesPoint">Point</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>point</tt> is the fundamental two-dimensional building block for spatial types. It consists of two <tt>double</tt> coordinates x and y.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := point(&quot;80.10d, -10E5&quot;)
+let $v2 := point(&quot;5.10E-10d, -10E5&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: point(&quot;80.1,-1000000.0&quot;), &quot;v2&quot;: point(&quot;5.1E-10,-1000000.0&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="Line_Back_to_TOC"></a><a name="PrimitiveTypesLine" id="PrimitiveTypesLine">Line</a> <font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>line</tt> consists of two points that represent the start and the end points of a line segment.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := line(&quot;10.1234,11.1e-1 +10.2E-2,-11.22&quot;)
+let $v2 := line(&quot;0.1234,-1.00e-10 +10.5E-2,-01.02&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: line(&quot;10.1234,1.11 0.102,-11.22&quot;), &quot;v2&quot;: line(&quot;0.1234,-1.0E-10 0.105,-1.02&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="RectangleBack_to_TOC"></a><a name="PrimitiveTypesRectangle" id="PrimitiveTypesRectangle">Rectangle</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>rectangle</tt> consists of two points that represent the <i><i>bottom left</i></i> and <i><i>upper right</i></i> corners of a rectangle.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := rectangle(&quot;5.1,11.8 87.6,15.6548&quot;)
+let $v2 := rectangle(&quot;0.1234,-1.00e-10 5.5487,0.48765&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: rectangle(&quot;5.1,11.8 87.6,15.6548&quot;), &quot;v2&quot;: rectangle(&quot;0.1234,-1.0E-10 5.5487,0.48765&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="CircleBack_to_TOC"></a><a name="PrimitiveTypesCircle" id="PrimitiveTypesCircle">Circle</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>circle</tt> consists of one point that represents the center of the circle and a radius of type <tt>double</tt>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := circle(&quot;10.1234,11.1e-1 +10.2E-2&quot;)
+let $v2 := circle(&quot;0.1234,-1.00e-10 +10.5E-2&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: circle(&quot;10.1234,1.11 0.102&quot;), &quot;v2&quot;: circle(&quot;0.1234,-1.0E-10 0.105&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="PolygonBack_to_TOC"></a><a name="PrimitiveTypesPolygon" id="PrimitiveTypesPolygon">Polygon</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>polygon</tt> consists of <i><i>n</i></i> points that represent the vertices of a <i><i>simple closed</i></i> polygon.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := polygon(&quot;-1.2,+1.3e2 -2.14E+5,2.15 -3.5e+2,03.6 -4.6E-3,+4.81&quot;)
+let $v2 := polygon(&quot;-1.0,+10.5e2 -02.15E+50,2.5 -1.0,+3.3e3 -2.50E+05,20.15 +3.5e+2,03.6 -4.60E-3,+4.75 -2,+1.0e2 -2.00E+5,20.10 30.5,03.25 -4.33E-3,+4.75&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: polygon(&quot;-1.2,130.0 -214000.0,2.15 -350.0,3.6 -0.0046,4.81&quot;), &quot;v2&quot;: polygon(&quot;-1.0,1050.0 -2.15E50,2.5 -1.0,3300.0 -250000.0,20.15 350.0,3.6 -0.0046,4.75 -2.0,100.0 -200000.0,20.1 30.5,3.25 -0.00433,4.75&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DateBack_to_TOC"></a><a name="PrimitiveTypesDate" id="PrimitiveTypesDate">Date</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>date</tt> represents a time point along the Gregorian calendar system specified by the year, month and day. ASTERIX supports the date from <tt>-9999-01-01</tt> to <tt>9999-12-31</tt>.</p>
+<p>A date value can be represented in two formats, extended format and basic format.</p>
+
+<ul>
+  
+<li>Extended format is represented as <tt>[-]yyyy-mm-dd</tt> for <tt>year-month-day</tt>. Each field should be padded if there are less digits than the format specified.</li>
+  
+<li>Basic format is in the format of <tt>[-]yyyymmdd</tt>.</li>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := date(&quot;2013-01-01&quot;)
+let $v2 := date(&quot;-19700101&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: date(&quot;2013-01-01&quot;), &quot;v2&quot;: date(&quot;-1970-01-01&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="TimeBack_to_TOC"></a><a name="PrimitiveTypesTime" id="PrimitiveTypesTime">Time</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>time</tt> type describes the time within the range of a day. It is represented by three fields: hour, minute and second. Millisecond field is optional as the fraction of the second field. Its extended format is as <tt>hh:mm:ss[.mmm]</tt> and the basic format is <tt>hhmmss[mmm]</tt>. The value domain is from <tt>00:00:00.000</tt> to <tt>23:59:59.999</tt>.</p>
+<p>Timezone field is optional for a time value. Timezone is represented as <tt>[+|-]hh:mm</tt> for extended format or <tt>[+|-]hhmm</tt> for basic format. Note that the sign designators cannot be omitted. <tt>Z</tt> can also be used to represent the UTC local time. If no timezone information is given, it is UTC by default.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := time(&quot;12:12:12.039Z&quot;)
+let $v2 := time(&quot;000000000-0800&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: time(&quot;12:12:12.039Z&quot;), &quot;v2&quot;: time(&quot;08:00:00.000Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DatetimeBack_to_TOC"></a><a name="PrimitiveTypesDateTime" id="PrimitiveTypesDateTime">Datetime</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>A <tt>datetime</tt> value is a combination of an <tt>date</tt> and <tt>time</tt>, representing a fixed time point along the Gregorian calendar system. The value is among <tt>-9999-01-01 00:00:00.000</tt> and <tt>9999-12-31 23:59:59.999</tt>.</p>
+<p>A <tt>datetime</tt> value is represented as a combination of the representation of its <tt>date</tt> part and <tt>time</tt> part, separated by a separator <tt>T</tt>. Either extended or basic format can be used, and the two parts should be the same format.</p>
+<p>Millisecond field and timezone field are optional, as specified in the <tt>time</tt> type.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := datetime(&quot;2013-01-01T12:12:12.039Z&quot;)
+let $v2 := datetime(&quot;-19700101T000000000-0800&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: datetime(&quot;2013-01-01T12:12:12.039Z&quot;), &quot;v2&quot;: datetime(&quot;-1970-01-01T08:00:00.000Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="DurationYear-month-durationDay-time-durationBack_to_TOC"></a><a name="PrimitiveTypesDuration" id="PrimitiveTypesDuration">Duration/Year-month-duration/Day-time-duration</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>duration</tt> represents a duration of time. A duration value is specified by integers on at least one of the following fields: year, month, day, hour, minute, second, and millisecond.</p>
+<p>A duration value is in the format of <tt>[-]PnYnMnDTnHnMn.mmmS</tt>. The millisecond part (as the fraction of the second field) is optional, and when no millisecond field is used, the decimal point should also be absent.</p>
+<p>Negative durations are also supported for the arithmetic operations between time instance types (<tt>date</tt>, <tt>time</tt> and <tt>datetime</tt>), and is used to roll the time back for the given duration. For example <tt>date(&quot;2012-01-01&quot;) + duration(&quot;-P3D&quot;)</tt> will return <tt>date(&quot;2011-12-29&quot;)</tt>.</p>
+<p>There are also two sub-duration types, namely <tt>year-month-duration</tt> and <tt>day-time-duration</tt>. <tt>year-month-duration</tt> represents only the years and months of a duration, while <tt>day-time-duration</tt> represents only the day to millisecond fields. Different from the <tt>duration</tt> type, both these two subtypes are totally ordered, so they can be used for comparison and index construction.</p>
+<p>Note that a canonical representation of the duration is always returned, regardless whether the duration is in the canonical representation or not from the user&#x2019;s input. More information about canonical representation can be found from <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-dayTimeDuration">XPath dayTimeDuration Canonical Representation</a> and <a class="externalLink" href="http://www.w3.org/TR/xpath-functions/#canonical-yearMonthDuration">yearMonthDuration Canonical Representation</a>.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := duration(&quot;P100Y12MT12M&quot;)
+let $v2 := duration(&quot;-PT20.943S&quot;)
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: duration(&quot;P101YT12M&quot;), &quot;v2&quot;: duration(&quot;-PT20.943S&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="IntervalBack_to_TOC"></a><a name="PrimitiveTypesInterval" id="PrimitiveTypesInterval">Interval</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>interval</tt> represents inclusive-exclusive ranges of time. It is defined by two time point values with the same temporal type(<tt>date</tt>, <tt>time</tt> or <tt>datetime</tt>).</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := interval-from-date(date(&quot;2013-01-01&quot;), date(&quot;20130505&quot;))
+let $v2 := interval-from-time(time(&quot;00:01:01&quot;), time(&quot;213901049+0800&quot;))
+let $v3 := interval-from-datetime(datetime(&quot;2013-01-01T00:01:01&quot;), datetime(&quot;20130505T213901049+0800&quot;))
+return { &quot;v1&quot;: $v1, &quot;v2&quot;: $v2, &quot;v3&quot;: $v3 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: interval-date(&quot;2013-01-01, 2013-05-05&quot;), &quot;v2&quot;: interval-time(&quot;00:01:01.000Z, 13:39:01.049Z&quot;), &quot;v3&quot;: interval-datetime(&quot;2013-01-01T00:01:01.000Z, 2013-05-05T13:39:01.049Z&quot;) }
+</pre></div></div></li>
+</ul></div>
+<div class="section">
+<h3><a name="UUIDBack_to_TOC"></a><a name="PrimitiveTypesUUID" id="PrimitiveTypesUUID">UUID</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p><tt>uuid</tt> represents a UUID value, which stands for Universally unique identifier. It is defined by a canonical format using hexadecimal text with inserted hyphen characters. (E.g.: 5a28ce1e-6a74-4201-9e8f-683256e5706f). This type is generally used to store auto-generated primary key values.</p>
+
+<ul>
+  
+<li>
+<p>Example:</p>
+  
+<div class="source">
+<div class="source">
+<pre>let $v1 := uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;)
+return { &quot;v1&quot;:$v1 }
+</pre></div></div></li>
+</ul>
+
+<ul>
+  
+<li>
+<p>The expected result is:</p>
+  
+<div class="source">
+<div class="source">
+<pre>{ &quot;v1&quot;: uuid(&quot;5c848e5c-6b6a-498f-8452-8847a2957421&quot;) }
+</pre></div></div></li>
+</ul></div></div>
+<div class="section">
+<h2><a name="Derived_TypesBack_to_TOC"></a><a name="DerivedTypes" id="DerivedTypes">Derived Types</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h2>
+<div class="section">
+<h3><a name="RecordBack_to_TOC"></a><a name="DerivedTypesRecord" id="DerivedTypesRecord">Record</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>A <tt>record</tt> contains a set of &#xfb01;elds, where each &#xfb01;eld is described by its name and type. A record type is either open or closed. Open records can contain &#xfb01;elds that are not part of the type de&#xfb01;nition, while closed records cannot. Syntactically, record constructors are surrounded by curly braces &#x201c;{&#x2026;}&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    { &quot;id&quot;: 213508, &quot;name&quot;: &quot;Alice Bob&quot; }
+</pre></div></div></div>
+<div class="section">
+<h3><a name="OrderedListBack_to_TOC"></a><a name="DerivedTypesOrderedList" id="DerivedTypesOrderedList">OrderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>An <tt>orderedList</tt> is a sequence of values for which the order is determined by creation or insertion. OrderedList constructors are denoted by brackets: &#x201c;[&#x2026;]&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    [&quot;alice&quot;, 123, &quot;bob&quot;, null]
+</pre></div></div></div>
+<div class="section">
+<h3><a name="UnorderedListBack_to_TOC"></a><a name="DerivedTypesUnorderedList" id="DerivedTypesUnorderedList">UnorderedList</a><font size="4"><a href="#toc">[Back to TOC]</a></font></h3>
+<p>An <tt>unorderedList</tt> is an unordered sequence of values, similar to bags in SQL. UnorderedList constructors are denoted by two opening flower braces followed by data and two closing flower braces, like &#x201c;{{&#x2026;}}&#x201d;.</p>
+<p>An example would be</p>
+
+<div class="source">
+<div class="source">
+<pre>    {{&quot;hello&quot;, 9328, &quot;world&quot;, [1, 2, null]}}
+</pre></div></div></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+              <div class="row span12">Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All Rights Reserved.      
+                    
+      </div>
+
+                                                                  <?xml version="1.0" encoding="UTF-8"?>
+<div class="row-fluid">Apache AsterixDB, AsterixDB, Apache, the Apache
+        feather logo, and the Apache AsterixDB project logo are either
+        registered trademarks or trademarks of The Apache Software
+        Foundation in the United States and other countries.
+        All other marks mentioned may be trademarks or registered
+        trademarks of their respective owners.</div>
+                  
+        
+                </div>
+    </footer>
+  </body>
+</html>


Mime
View raw message