You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by za...@apache.org on 2022/09/16 21:45:31 UTC

[calcite-site] branch main updated: [CALCITE-5287] SQL reference page is missing from website

This is an automated email from the ASF dual-hosted git repository.

zabetak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-site.git


The following commit(s) were added to refs/heads/main by this push:
     new fda5344f [CALCITE-5287] SQL reference page is missing from website
fda5344f is described below

commit fda5344fd576380e27b9f23b31deb0270d06ce74
Author: Stamatis Zampetakis <za...@gmail.com>
AuthorDate: Fri Sep 16 18:52:18 2022 +0200

    [CALCITE-5287] SQL reference page is missing from website
    
    The newline at the beginning of reference.md page seems to be causing
    a problem with Jekyll that ignores the .md file and fails to generate
    the respective .html file.
---
 docs/adapter.html               |    2 +-
 docs/algebra.html               |    2 +-
 docs/cassandra_adapter.html     |    2 +-
 docs/druid_adapter.html         |    2 +-
 docs/elasticsearch_adapter.html |    2 +-
 docs/file_adapter.html          |    2 +-
 docs/geode_adapter.html         |    2 +-
 docs/history.html               |    2 +-
 docs/howto.html                 |    2 +-
 docs/index.html                 |    2 +-
 docs/innodb_adapter.html        |    2 +-
 docs/kafka_adapter.html         |    2 +-
 docs/lattice.html               |    2 +-
 docs/materialized_views.html    |    2 +-
 docs/model.html                 |    2 +-
 docs/os_adapter.html            |    2 +-
 docs/pig_adapter.html           |    2 +-
 docs/powered_by.html            |    2 +-
 docs/redis_adapter.html         |    2 +-
 docs/reference.html             | 6563 +++++++++++++++++++++++++++++++++++++++
 docs/reference.md               | 3260 -------------------
 docs/spatial.html               |    2 +-
 docs/stream.html                |    2 +-
 docs/tutorial.html              |    2 +-
 24 files changed, 6585 insertions(+), 3282 deletions(-)

diff --git a/docs/adapter.html b/docs/adapter.html
index 742d3d1e..187fffe5 100644
--- a/docs/adapter.html
+++ b/docs/adapter.html
@@ -979,7 +979,7 @@ is computed only once.</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/algebra.html b/docs/algebra.html
index effa1bee..8ab7b19b 100644
--- a/docs/algebra.html
+++ b/docs/algebra.html
@@ -1278,7 +1278,7 @@ call and then call its <code class="language-plaintext highlighter-rouge">over()
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/cassandra_adapter.html b/docs/cassandra_adapter.html
index ba6cd87a..0d3c2d7b 100644
--- a/docs/cassandra_adapter.html
+++ b/docs/cassandra_adapter.html
@@ -382,7 +382,7 @@ prove useful.</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/druid_adapter.html b/docs/druid_adapter.html
index 92598b65..94c729c9 100644
--- a/docs/druid_adapter.html
+++ b/docs/druid_adapter.html
@@ -558,7 +558,7 @@ and the two tables in Druid (<code class="language-plaintext highlighter-rouge">
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/elasticsearch_adapter.html b/docs/elasticsearch_adapter.html
index 23d87dfc..80b625e5 100644
--- a/docs/elasticsearch_adapter.html
+++ b/docs/elasticsearch_adapter.html
@@ -422,7 +422,7 @@ Also, types are not supported (this adapter only supports indices).</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/file_adapter.html b/docs/file_adapter.html
index b217d921..940e71dd 100644
--- a/docs/file_adapter.html
+++ b/docs/file_adapter.html
@@ -586,7 +586,7 @@ files) and being able to form URLs dynamically to push down filters.</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/geode_adapter.html b/docs/geode_adapter.html
index 33bcb402..4188c96f 100644
--- a/docs/geode_adapter.html
+++ b/docs/geode_adapter.html
@@ -448,7 +448,7 @@ prove useful.</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/history.html b/docs/history.html
index 04a4a112..8cad4781 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -9480,7 +9480,7 @@ conflicts in multithreaded usage</li>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/howto.html b/docs/howto.html
index eb5fce64..f36301ec 100644
--- a/docs/howto.html
+++ b/docs/howto.html
@@ -1342,7 +1342,7 @@ that <code class="language-plaintext highlighter-rouge">main</code> code freeze
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/index.html b/docs/index.html
index 75969c12..a7434f5a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -386,7 +386,7 @@ more details in the <a href="reference.html">SQL reference</a>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/innodb_adapter.html b/docs/innodb_adapter.html
index 532b5e77..567a1c94 100644
--- a/docs/innodb_adapter.html
+++ b/docs/innodb_adapter.html
@@ -653,7 +653,7 @@ leveraging cost based optimization.
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/kafka_adapter.html b/docs/kafka_adapter.html
index b2c56aa7..ff411d3e 100644
--- a/docs/kafka_adapter.html
+++ b/docs/kafka_adapter.html
@@ -381,7 +381,7 @@ sqlline&gt; <span class="o">!</span>connect jdbc:calcite:model<span class="o">=<
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/lattice.html b/docs/lattice.html
index 47c6a7bf..ea941709 100644
--- a/docs/lattice.html
+++ b/docs/lattice.html
@@ -616,7 +616,7 @@ data is changed.</li>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/materialized_views.html b/docs/materialized_views.html
index 94b9c5bb..cbb7dbe1 100644
--- a/docs/materialized_views.html
+++ b/docs/materialized_views.html
@@ -645,7 +645,7 @@ Additionally, the rule can rewrite expressions rooted at an Aggregate operator,
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/model.html b/docs/model.html
index 4f1c4204..53e61e4a 100644
--- a/docs/model.html
+++ b/docs/model.html
@@ -996,7 +996,7 @@ when you want to pass the column as a measure argument.</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/os_adapter.html b/docs/os_adapter.html
index e12d4631..33f0aadd 100644
--- a/docs/os_adapter.html
+++ b/docs/os_adapter.html
@@ -550,7 +550,7 @@ into <a href="https://github.com/julianhyde/sqlline">sqlline</a>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/pig_adapter.html b/docs/pig_adapter.html
index 03fdde8a..aef97591 100644
--- a/docs/pig_adapter.html
+++ b/docs/pig_adapter.html
@@ -362,7 +362,7 @@ So, Piglet is basically the opposite of the Pig adapter.</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/powered_by.html b/docs/powered_by.html
index 51f6a47f..93b82e1f 100644
--- a/docs/powered_by.html
+++ b/docs/powered_by.html
@@ -454,7 +454,7 @@ graph database.</p>
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/redis_adapter.html b/docs/redis_adapter.html
index 5e7b718e..cc2696b5 100644
--- a/docs/redis_adapter.html
+++ b/docs/redis_adapter.html
@@ -522,7 +522,7 @@ More Redis features need to be further refined: for example HyperLogLog and Pub/
 
   
 
-  
+  <li class=""><a href="/docs/reference.html">SQL language</a></li>
 
 
   
diff --git a/docs/reference.html b/docs/reference.html
new file mode 100644
index 00000000..3d9d9438
--- /dev/null
+++ b/docs/reference.html
@@ -0,0 +1,6563 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <meta charset="UTF-8">
+  <title>SQL language</title>
+  <meta name="viewport" content="width=device-width,initial-scale=1">
+  <meta name="generator" content="Jekyll v4.2.2">
+  <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
+  <link rel="stylesheet" href="/css/screen.css">
+  <link rel="icon" type="image/x-icon" href="/favicon.ico">
+</head>
+
+
+<body class="wrap">
+  <header role="banner">
+  <div class="grid">
+    <div class="unit center-on-mobiles">
+      <h1>
+        <a href="/">
+          <span class="sr-only">Apache Calcite</span>
+          <img src="/img/logo.svg" alt="Calcite Logo">
+        </a>
+      </h1>
+    </div>
+    <nav class="main-nav">
+      <ul>
+  <li class="">
+    <a href="/">Home</a>
+  </li>
+  <li class="">
+    <a href="/downloads/">Download</a>
+  </li>
+  <li class="">
+    <a href="/community/">Community</a>
+  </li>
+  <li class="">
+    <a href="/develop/">Develop</a>
+  </li>
+  <li class="">
+    <a href="/news/">News</a>
+  </li>
+  <li class="current">
+    <a href="/docs/">Docs</a>
+  </li>
+</ul>
+
+    </nav>
+  </div>
+</header>
+
+
+    <section class="docs">
+    <div class="grid">
+
+      <div class="docs-nav-mobile unit whole show-on-mobiles">
+  <select onchange="if (this.value) window.location.href=this.value">
+    <option value="">Navigate the docs…</option>
+        <optgroup label="Overview">      
+    </optgroup>
+    <optgroup label="Advanced">      
+    </optgroup>
+    <optgroup label="Avatica">      
+    </optgroup>
+    <optgroup label="Reference">      
+    </optgroup>
+    <optgroup label="Meta">      
+    </optgroup>
+
+  </select>
+</div>
+
+
+      <div class="unit four-fifths">
+        <article>
+          <h1>SQL language</h1>
+          <!--
+
+-->
+
+<style>
+.container {
+  width: 400px;
+  height: 26px;
+}
+.gray {
+  width: 60px;
+  height: 26px;
+  background: gray;
+  float: left;
+}
+.r15 {
+  width: 40px;
+  height: 6px;
+  background: yellow;
+  margin-top: 4px;
+  margin-left: 10px;
+}
+.r12 {
+  width: 10px;
+  height: 6px;
+  background: yellow;
+  margin-top: 4px;
+  margin-left: 10px;
+}
+.r13 {
+  width: 20px;
+  height: 6px;
+  background: yellow;
+  margin-top: 4px;
+  margin-left: 10px;
+}
+.r2 {
+  width: 2px;
+  height: 6px;
+  background: yellow;
+  margin-top: 4px;
+  margin-left: 20px;
+}
+.r24 {
+  width: 20px;
+  height: 6px;
+  background: yellow;
+  margin-top: 4px;
+  margin-left: 20px;
+}
+.r35 {
+  width: 20px;
+  height: 6px;
+  background: yellow;
+  margin-top: 4px;
+  margin-left: 30px;
+}
+</style>
+
+<p>The page describes the SQL dialect recognized by Calcite’s default SQL parser.</p>
+
+<h2 id="grammar">Grammar</h2>
+
+<p>SQL grammar in <a href="https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">BNF</a>-like
+form.</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">statement</span><span class="p">:</span>
+      <span class="n">setStatement</span>
+  <span class="o">|</span>   <span class="n">resetStatement</span>
+  <span class="o">|</span>   <span class="k">explain</span>
+  <span class="o">|</span>   <span class="k">describe</span>
+  <span class="o">|</span>   <span class="k">insert</span>
+  <span class="o">|</span>   <span class="k">update</span>
+  <span class="o">|</span>   <span class="n">merge</span>
+  <span class="o">|</span>   <span class="k">delete</span>
+  <span class="o">|</span>   <span class="n">query</span>
+
+<span class="n">statementList</span><span class="p">:</span>
+      <span class="k">statement</span> <span class="p">[</span> <span class="s1">';'</span> <span class="k">statement</span> <span class="p">]</span><span class="o">*</span> <span class="p">[</span> <span class="s1">';'</span> <span class="p">]</span>
+
+<span class="n">setStatement</span><span class="p">:</span>
+      <span class="p">[</span> <span class="k">ALTER</span> <span class="p">{</span> <span class="k">SYSTEM</span> <span class="o">|</span> <span class="k">SESSION</span> <span class="p">}</span> <span class="p">]</span> <span class="k">SET</span> <span class="n">identifier</span> <span class="s1">'='</span> <span class="n">expression</span>
+
+<span class="n">resetStatement</span><span class="p">:</span>
+      <span class="p">[</span> <span class="k">ALTER</span> <span class="p">{</span> <span class="k">SYSTEM</span> <span class="o">|</span> <span class="k">SESSION</span> <span class="p">}</span> <span class="p">]</span> <span class="k">RESET</span> <span class="n">identifier</span>
+  <span class="o">|</span>   <span class="p">[</span> <span class="k">ALTER</span> <span class="p">{</span> <span class="k">SYSTEM</span> <span class="o">|</span> <span class="k">SESSION</span> <span class="p">}</span> <span class="p">]</span> <span class="k">RESET</span> <span class="k">ALL</span>
+
+<span class="k">explain</span><span class="p">:</span>
+      <span class="k">EXPLAIN</span> <span class="n">PLAN</span>
+      <span class="p">[</span> <span class="k">WITH</span> <span class="k">TYPE</span> <span class="o">|</span> <span class="k">WITH</span> <span class="k">IMPLEMENTATION</span> <span class="o">|</span> <span class="k">WITHOUT</span> <span class="k">IMPLEMENTATION</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">EXCLUDING</span> <span class="n">ATTRIBUTES</span> <span class="o">|</span> <span class="k">INCLUDING</span> <span class="p">[</span> <span class="k">ALL</span> <span class="p">]</span> <span class="n">ATTRIBUTES</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">AS</span> <span class="n">JSON</span> <span class="o">|</span> <span class="k">AS</span> <span class="n">XML</span> <span class="o">|</span> <span class="k">AS</span> <span class="n">DOT</span> <span class="p">]</span>
+      <span class="k">FOR</span> <span class="p">{</span> <span class="n">query</span> <span class="o">|</span> <span class="k">insert</span> <span class="o">|</span> <span class="k">update</span> <span class="o">|</span> <span class="n">merge</span> <span class="o">|</span> <span class="k">delete</span> <span class="p">}</span>
+
+<span class="k">describe</span><span class="p">:</span>
+      <span class="k">DESCRIBE</span> <span class="k">DATABASE</span> <span class="n">databaseName</span>
+  <span class="o">|</span>   <span class="k">DESCRIBE</span> <span class="k">CATALOG</span> <span class="p">[</span> <span class="n">databaseName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">catalogName</span>
+  <span class="o">|</span>   <span class="k">DESCRIBE</span> <span class="k">SCHEMA</span> <span class="p">[</span> <span class="p">[</span> <span class="n">databaseName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">catalogName</span> <span class="p">]</span> <span class="p">.</span> <span class="n">schemaName</span>
+  <span class="o">|</span>   <span class="k">DESCRIBE</span> <span class="p">[</span> <span class="k">TABLE</span> <span class="p">]</span> <span class="p">[</span> <span class="p">[</span> <span class="p">[</span> <span class="n">databaseName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">catalogName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">schemaName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">tableN [...]
+  <span class="o">|</span>   <span class="k">DESCRIBE</span> <span class="p">[</span> <span class="k">STATEMENT</span> <span class="p">]</span> <span class="p">{</span> <span class="n">query</span> <span class="o">|</span> <span class="k">insert</span> <span class="o">|</span> <span class="k">update</span> <span class="o">|</span> <span class="n">merge</span> <span class="o">|</span> <span class="k">delete</span> <span class="p">}</span>
+
+<span class="k">insert</span><span class="p">:</span>
+      <span class="p">{</span> <span class="k">INSERT</span> <span class="o">|</span> <span class="n">UPSERT</span> <span class="p">}</span> <span class="k">INTO</span> <span class="n">tablePrimary</span>
+      <span class="p">[</span> <span class="s1">'('</span> <span class="k">column</span> <span class="p">[,</span> <span class="k">column</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="n">query</span>
+
+<span class="k">update</span><span class="p">:</span>
+      <span class="k">UPDATE</span> <span class="n">tablePrimary</span>
+      <span class="k">SET</span> <span class="n">assign</span> <span class="p">[,</span> <span class="n">assign</span> <span class="p">]</span><span class="o">*</span>
+      <span class="p">[</span> <span class="k">WHERE</span> <span class="n">booleanExpression</span> <span class="p">]</span>
+
+<span class="n">assign</span><span class="p">:</span>
+      <span class="n">identifier</span> <span class="s1">'='</span> <span class="n">expression</span>
+
+<span class="n">merge</span><span class="p">:</span>
+      <span class="n">MERGE</span> <span class="k">INTO</span> <span class="n">tablePrimary</span> <span class="p">[</span> <span class="p">[</span> <span class="k">AS</span> <span class="p">]</span> <span class="k">alias</span> <span class="p">]</span>
+      <span class="k">USING</span> <span class="n">tablePrimary</span>
+      <span class="k">ON</span> <span class="n">booleanExpression</span>
+      <span class="p">[</span> <span class="k">WHEN</span> <span class="n">MATCHED</span> <span class="k">THEN</span> <span class="k">UPDATE</span> <span class="k">SET</span> <span class="n">assign</span> <span class="p">[,</span> <span class="n">assign</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">WHEN</span> <span class="k">NOT</span> <span class="n">MATCHED</span> <span class="k">THEN</span> <span class="k">INSERT</span> <span class="k">VALUES</span> <span class="s1">'('</span> <span class="n">value</span> <span class="p">[</span> <span class="p">,</span> <span class="n">value</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+
+<span class="k">delete</span><span class="p">:</span>
+      <span class="k">DELETE</span> <span class="k">FROM</span> <span class="n">tablePrimary</span> <span class="p">[</span> <span class="p">[</span> <span class="k">AS</span> <span class="p">]</span> <span class="k">alias</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">WHERE</span> <span class="n">booleanExpression</span> <span class="p">]</span>
+
+<span class="n">query</span><span class="p">:</span>
+      <span class="k">values</span>
+  <span class="o">|</span>   <span class="k">WITH</span> <span class="n">withItem</span> <span class="p">[</span> <span class="p">,</span> <span class="n">withItem</span> <span class="p">]</span><span class="o">*</span> <span class="n">query</span>
+  <span class="o">|</span>   <span class="p">{</span>
+          <span class="k">select</span>
+      <span class="o">|</span>   <span class="n">selectWithoutFrom</span>
+      <span class="o">|</span>   <span class="n">query</span> <span class="k">UNION</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="n">query</span>
+      <span class="o">|</span>   <span class="n">query</span> <span class="k">EXCEPT</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="n">query</span>
+      <span class="o">|</span>   <span class="n">query</span> <span class="n">MINUS</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="n">query</span>
+      <span class="o">|</span>   <span class="n">query</span> <span class="k">INTERSECT</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="n">query</span>
+      <span class="p">}</span>
+      <span class="p">[</span> <span class="k">ORDER</span> <span class="k">BY</span> <span class="n">orderItem</span> <span class="p">[,</span> <span class="n">orderItem</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">LIMIT</span> <span class="p">{</span> <span class="p">[</span> <span class="k">start</span><span class="p">,</span> <span class="p">]</span> <span class="k">count</span> <span class="o">|</span> <span class="k">ALL</span> <span class="p">}</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">OFFSET</span> <span class="k">start</span> <span class="p">{</span> <span class="k">ROW</span> <span class="o">|</span> <span class="k">ROWS</span> <span class="p">}</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">FETCH</span> <span class="p">{</span> <span class="k">FIRST</span> <span class="o">|</span> <span class="k">NEXT</span> <span class="p">}</span> <span class="p">[</span> <span class="k">count</span> <span class="p">]</span> <span class="p">{</span> <span class="k">ROW</span> <span class="o">|</span> <span class="k">ROWS</span> <span class="p">}</span> <span class="k">ONLY</span> <span class="p">]</span>
+
+<span class="n">withItem</span><span class="p">:</span>
+      <span class="n">name</span>
+      <span class="p">[</span> <span class="s1">'('</span> <span class="k">column</span> <span class="p">[,</span> <span class="k">column</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="k">AS</span> <span class="s1">'('</span> <span class="n">query</span> <span class="s1">')'</span>
+
+<span class="n">orderItem</span><span class="p">:</span>
+      <span class="n">expression</span> <span class="p">[</span> <span class="k">ASC</span> <span class="o">|</span> <span class="k">DESC</span> <span class="p">]</span> <span class="p">[</span> <span class="n">NULLS</span> <span class="k">FIRST</span> <span class="o">|</span> <span class="n">NULLS</span> <span class="k">LAST</span> <span class="p">]</span>
+
+<span class="k">select</span><span class="p">:</span>
+      <span class="k">SELECT</span> <span class="p">[</span> <span class="n">hintComment</span> <span class="p">]</span> <span class="p">[</span> <span class="n">STREAM</span> <span class="p">]</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span>
+          <span class="p">{</span> <span class="o">*</span> <span class="o">|</span> <span class="n">projectItem</span> <span class="p">[,</span> <span class="n">projectItem</span> <span class="p">]</span><span class="o">*</span> <span class="p">}</span>
+      <span class="k">FROM</span> <span class="n">tableExpression</span>
+      <span class="p">[</span> <span class="k">WHERE</span> <span class="n">booleanExpression</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">GROUP</span> <span class="k">BY</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="p">{</span> <span class="n">groupItem</span> <span class="p">[,</span> <span class="n">groupItem</span> <span class="p">]</span><span class="o">*</span> <span class="p">}</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">HAVING</span> <span class="n">booleanExpression</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">WINDOW</span> <span class="n">windowName</span> <span class="k">AS</span> <span class="n">windowSpec</span> <span class="p">[,</span> <span class="n">windowName</span> <span class="k">AS</span> <span class="n">windowSpec</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+
+<span class="n">selectWithoutFrom</span><span class="p">:</span>
+      <span class="k">SELECT</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span>
+          <span class="p">{</span> <span class="o">*</span> <span class="o">|</span> <span class="n">projectItem</span> <span class="p">[,</span> <span class="n">projectItem</span> <span class="p">]</span><span class="o">*</span> <span class="p">}</span>
+
+<span class="n">projectItem</span><span class="p">:</span>
+      <span class="n">expression</span> <span class="p">[</span> <span class="p">[</span> <span class="k">AS</span> <span class="p">]</span> <span class="n">columnAlias</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="n">tableAlias</span> <span class="p">.</span> <span class="o">*</span>
+
+<span class="n">tableExpression</span><span class="p">:</span>
+      <span class="n">tableReference</span> <span class="p">[,</span> <span class="n">tableReference</span> <span class="p">]</span><span class="o">*</span>
+  <span class="o">|</span>   <span class="n">tableExpression</span> <span class="p">[</span> <span class="k">NATURAL</span> <span class="p">]</span> <span class="p">[</span> <span class="p">{</span> <span class="k">LEFT</span> <span class="o">|</span> <span class="k">RIGHT</span> <span class="o">|</span> <span class="k">FULL</span> <span class="p">}</span> <span class="p">[</span> <span class="k">OUTER</span> <span class="p">]</span> <span class="p">]</span> <span class="k">JOIN</span> < [...]
+  <span class="o">|</span>   <span class="n">tableExpression</span> <span class="k">CROSS</span> <span class="k">JOIN</span> <span class="n">tableExpression</span>
+  <span class="o">|</span>   <span class="n">tableExpression</span> <span class="p">[</span> <span class="k">CROSS</span> <span class="o">|</span> <span class="k">OUTER</span> <span class="p">]</span> <span class="n">APPLY</span> <span class="n">tableExpression</span>
+
+<span class="n">joinCondition</span><span class="p">:</span>
+      <span class="k">ON</span> <span class="n">booleanExpression</span>
+  <span class="o">|</span>   <span class="k">USING</span> <span class="s1">'('</span> <span class="k">column</span> <span class="p">[,</span> <span class="k">column</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+
+<span class="n">tableReference</span><span class="p">:</span>
+      <span class="n">tablePrimary</span>
+      <span class="p">[</span> <span class="k">FOR</span> <span class="n">SYSTEM_TIME</span> <span class="k">AS</span> <span class="k">OF</span> <span class="n">expression</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">pivot</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">unpivot</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">matchRecognize</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="p">[</span> <span class="k">AS</span> <span class="p">]</span> <span class="k">alias</span> <span class="p">[</span> <span class="s1">'('</span> <span class="n">columnAlias</span> <span class="p">[,</span> <span class="n">columnAlias</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span> <span class="p">]</span>
+
+<span class="n">tablePrimary</span><span class="p">:</span>
+      <span class="p">[</span> <span class="p">[</span> <span class="n">catalogName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">schemaName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">tableName</span>
+      <span class="s1">'('</span> <span class="k">TABLE</span> <span class="p">[</span> <span class="p">[</span> <span class="n">catalogName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">schemaName</span> <span class="p">.</span> <span class="p">]</span> <span class="n">tableName</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="n">tablePrimary</span> <span class="p">[</span> <span class="n">hintComment</span> <span class="p">]</span> <span class="p">[</span> <span class="n">EXTEND</span> <span class="p">]</span> <span class="s1">'('</span> <span class="n">columnDecl</span> <span class="p">[,</span> <span class="n">columnDecl</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="p">[</span> <span class="k">LATERAL</span> <span class="p">]</span> <span class="s1">'('</span> <span class="n">query</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="k">UNNEST</span> <span class="s1">'('</span> <span class="n">expression</span> <span class="s1">')'</span> <span class="p">[</span> <span class="k">WITH</span> <span class="k">ORDINALITY</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="p">[</span> <span class="k">LATERAL</span> <span class="p">]</span> <span class="k">TABLE</span> <span class="s1">'('</span> <span class="p">[</span> <span class="k">SPECIFIC</span> <span class="p">]</span> <span class="n">functionName</span> <span class="s1">'('</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span cl [...]
+
+<span class="n">columnDecl</span><span class="p">:</span>
+      <span class="k">column</span> <span class="k">type</span> <span class="p">[</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="p">]</span>
+
+<span class="n">hint</span><span class="p">:</span>
+      <span class="n">hintName</span>
+  <span class="o">|</span>   <span class="n">hintName</span> <span class="s1">'('</span> <span class="n">hintOptions</span> <span class="s1">')'</span>
+
+<span class="n">hintOptions</span><span class="p">:</span>
+      <span class="n">hintKVOption</span> <span class="p">[,</span> <span class="n">hintKVOption</span> <span class="p">]</span><span class="o">*</span>
+  <span class="o">|</span>   <span class="n">optionName</span> <span class="p">[,</span> <span class="n">optionName</span> <span class="p">]</span><span class="o">*</span>
+  <span class="o">|</span>   <span class="n">optionValue</span> <span class="p">[,</span> <span class="n">optionValue</span> <span class="p">]</span><span class="o">*</span>
+
+<span class="n">hintKVOption</span><span class="p">:</span>
+      <span class="n">optionName</span> <span class="s1">'='</span> <span class="n">stringLiteral</span>
+  <span class="o">|</span>   <span class="n">stringLiteral</span> <span class="s1">'='</span> <span class="n">stringLiteral</span>
+
+<span class="n">optionValue</span><span class="p">:</span>
+      <span class="n">stringLiteral</span>
+  <span class="o">|</span>   <span class="n">numericLiteral</span>
+
+<span class="n">columnOrList</span><span class="p">:</span>
+      <span class="k">column</span>
+  <span class="o">|</span>   <span class="s1">'('</span> <span class="k">column</span> <span class="p">[,</span> <span class="k">column</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+
+<span class="n">exprOrList</span><span class="p">:</span>
+      <span class="n">expr</span>
+  <span class="o">|</span>   <span class="s1">'('</span> <span class="n">expr</span> <span class="p">[,</span> <span class="n">expr</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+
+<span class="n">pivot</span><span class="p">:</span>
+      <span class="n">PIVOT</span> <span class="s1">'('</span>
+      <span class="n">pivotAgg</span> <span class="p">[,</span> <span class="n">pivotAgg</span> <span class="p">]</span><span class="o">*</span>
+      <span class="k">FOR</span> <span class="n">pivotList</span>
+      <span class="k">IN</span> <span class="s1">'('</span> <span class="n">pivotExpr</span> <span class="p">[,</span> <span class="n">pivotExpr</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="s1">')'</span>
+
+<span class="n">pivotAgg</span><span class="p">:</span>
+      <span class="n">agg</span> <span class="s1">'('</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="n">value</span> <span class="p">[,</span> <span class="n">value</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="p">[</span> <span class="p">[</span> <span class="k">AS</span> <span class="p">]</span> <span class="k">alias</span> <span class="p">]</span>
+
+<span class="n">pivotList</span><span class="p">:</span>
+      <span class="n">columnOrList</span>
+
+<span class="n">pivotExpr</span><span class="p">:</span>
+      <span class="n">exprOrList</span> <span class="p">[</span> <span class="p">[</span> <span class="k">AS</span> <span class="p">]</span> <span class="k">alias</span> <span class="p">]</span>
+
+<span class="n">unpivot</span><span class="p">:</span>
+      <span class="n">UNPIVOT</span> <span class="p">[</span> <span class="k">INCLUDING</span> <span class="n">NULLS</span> <span class="o">|</span> <span class="k">EXCLUDING</span> <span class="n">NULLS</span> <span class="p">]</span> <span class="s1">'('</span>
+      <span class="n">unpivotMeasureList</span>
+      <span class="k">FOR</span> <span class="n">unpivotAxisList</span>
+      <span class="k">IN</span> <span class="s1">'('</span> <span class="n">unpivotValue</span> <span class="p">[,</span> <span class="n">unpivotValue</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="s1">')'</span>
+
+<span class="n">unpivotMeasureList</span><span class="p">:</span>
+      <span class="n">columnOrList</span>
+
+<span class="n">unpivotAxisList</span><span class="p">:</span>
+      <span class="n">columnOrList</span>
+
+<span class="n">unpivotValue</span><span class="p">:</span>
+      <span class="k">column</span> <span class="p">[</span> <span class="k">AS</span> <span class="n">literal</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="s1">'('</span> <span class="k">column</span> <span class="p">[,</span> <span class="k">column</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">[</span> <span class="k">AS</span> <span class="s1">'('</span> <span class="n">literal</span> <span class="p">[,</span> <span class="n">literal</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+
+<span class="k">values</span><span class="p">:</span>
+      <span class="k">VALUES</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span>
+
+<span class="n">groupItem</span><span class="p">:</span>
+      <span class="n">expression</span>
+  <span class="o">|</span>   <span class="s1">'('</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="s1">'('</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="k">CUBE</span> <span class="s1">'('</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="k">ROLLUP</span> <span class="s1">'('</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="k">GROUPING</span> <span class="k">SETS</span> <span class="s1">'('</span> <span class="n">groupItem</span> <span class="p">[,</span> <span class="n">groupItem</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+
+<span class="k">window</span><span class="p">:</span>
+      <span class="n">windowName</span>
+  <span class="o">|</span>   <span class="n">windowSpec</span>
+
+<span class="n">windowSpec</span><span class="p">:</span>
+      <span class="s1">'('</span>
+      <span class="p">[</span> <span class="n">windowName</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">ORDER</span> <span class="k">BY</span> <span class="n">orderItem</span> <span class="p">[,</span> <span class="n">orderItem</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">PARTITION</span> <span class="k">BY</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span>
+          <span class="k">RANGE</span> <span class="n">numericOrIntervalExpression</span> <span class="p">{</span> <span class="k">PRECEDING</span> <span class="o">|</span> <span class="k">FOLLOWING</span> <span class="p">}</span>
+      <span class="o">|</span>   <span class="k">ROWS</span> <span class="n">numericExpression</span> <span class="p">{</span> <span class="k">PRECEDING</span> <span class="o">|</span> <span class="k">FOLLOWING</span> <span class="p">}</span>
+      <span class="p">]</span>
+      <span class="s1">')'</span></code></pre></figure>
+
+<p>In <em>insert</em>, if the INSERT or UPSERT statement does not specify a
+list of target columns, the query must have the same number of
+columns as the target table, except in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#isInsertSubsetColumnsAllowed--">conformance levels</a>.</p>
+
+<p>In <em>merge</em>, at least one of the WHEN MATCHED and WHEN NOT MATCHED clauses must
+be present.</p>
+
+<p><em>tablePrimary</em> may only contain an EXTEND clause in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#allowExtend--">conformance levels</a>;
+in those same conformance levels, any <em>column</em> in <em>insert</em> may be replaced by
+<em>columnDecl</em>, which has a similar effect to including it in an EXTEND clause.</p>
+
+<p>In <em>orderItem</em>, if <em>expression</em> is a positive integer <em>n</em>, it denotes
+the <em>n</em>th item in the SELECT clause.</p>
+
+<p>In <em>query</em>, <em>count</em> and <em>start</em> may each be either an unsigned integer literal
+or a dynamic parameter whose value is an integer.</p>
+
+<p>An aggregate query is a query that contains a GROUP BY or a HAVING
+clause, or aggregate functions in the SELECT clause. In the SELECT,
+HAVING and ORDER BY clauses of an aggregate query, all expressions
+must be constant within the current group (that is, grouping constants
+as defined by the GROUP BY clause, or constants), or aggregate
+functions, or a combination of constants and aggregate
+functions. Aggregate and grouping functions may only appear in an
+aggregate query, and only in a SELECT, HAVING or ORDER BY clause.</p>
+
+<p>A scalar sub-query is a sub-query used as an expression.
+If the sub-query returns no rows, the value is NULL; if it
+returns more than one row, it is an error.</p>
+
+<p>IN, EXISTS, UNIQUE and scalar sub-queries can occur
+in any place where an expression can occur (such as the SELECT clause,
+WHERE clause, ON clause of a JOIN, or as an argument to an aggregate
+function).</p>
+
+<p>An IN, EXISTS, UNIQUE or scalar sub-query may be correlated; that is, it
+may refer to tables in the FROM clause of an enclosing query.</p>
+
+<p>GROUP BY DISTINCT removes duplicate grouping sets (for example,
+“GROUP BY DISTINCT GROUPING SETS ((a), (a, b), (a))” is equivalent to
+“GROUP BY GROUPING SETS ((a), (a, b))”);
+GROUP BY ALL is equivalent to GROUP BY.</p>
+
+<p><em>selectWithoutFrom</em> is equivalent to VALUES,
+but is not standard SQL and is only allowed in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#isFromRequired--">conformance levels</a>.</p>
+
+<p>MINUS is equivalent to EXCEPT,
+but is not standard SQL and is only allowed in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#isMinusAllowed--">conformance levels</a>.</p>
+
+<p>CROSS APPLY and OUTER APPLY are only allowed in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#isApplyAllowed--">conformance levels</a>.</p>
+
+<p>“LIMIT start, count” is equivalent to “LIMIT count OFFSET start”
+but is only allowed in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#isLimitStartCountAllowed--">conformance levels</a>.</p>
+
+<p>“OFFSET start” may occur before “LIMIT count” in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#isOffsetLimitAllowed--">conformance levels</a>.</p>
+
+<h2 id="keywords">Keywords</h2>
+
+<p>The following is a list of SQL keywords.
+Reserved keywords are <strong>bold</strong>.</p>
+
+<p>A,
+<strong>ABS</strong>,
+ABSENT,
+ABSOLUTE,
+ACTION,
+ADA,
+ADD,
+ADMIN,
+AFTER,
+<strong>ALL</strong>,
+<strong>ALLOCATE</strong>,
+<strong>ALLOW</strong>,
+<strong>ALTER</strong>,
+ALWAYS,
+<strong>AND</strong>,
+<strong>ANY</strong>,
+APPLY,
+<strong>ARE</strong>,
+<strong>ARRAY</strong>,
+ARRAY_AGG,
+ARRAY_CONCAT_AGG,
+<strong>ARRAY_MAX_CARDINALITY</strong>,
+<strong>AS</strong>,
+ASC,
+<strong>ASENSITIVE</strong>,
+ASSERTION,
+ASSIGNMENT,
+<strong>ASYMMETRIC</strong>,
+<strong>AT</strong>,
+<strong>ATOMIC</strong>,
+ATTRIBUTE,
+ATTRIBUTES,
+<strong>AUTHORIZATION</strong>,
+<strong>AVG</strong>,
+BEFORE,
+<strong>BEGIN</strong>,
+<strong>BEGIN_FRAME</strong>,
+<strong>BEGIN_PARTITION</strong>,
+BERNOULLI,
+<strong>BETWEEN</strong>,
+<strong>BIGINT</strong>,
+<strong>BINARY</strong>,
+<strong>BIT</strong>,
+<strong>BLOB</strong>,
+<strong>BOOLEAN</strong>,
+<strong>BOTH</strong>,
+BREADTH,
+<strong>BY</strong>,
+C,
+<strong>CALL</strong>,
+<strong>CALLED</strong>,
+<strong>CARDINALITY</strong>,
+CASCADE,
+<strong>CASCADED</strong>,
+<strong>CASE</strong>,
+<strong>CAST</strong>,
+CATALOG,
+CATALOG_NAME,
+<strong>CEIL</strong>,
+<strong>CEILING</strong>,
+CENTURY,
+CHAIN,
+<strong>CHAR</strong>,
+<strong>CHARACTER</strong>,
+CHARACTERISTICS,
+CHARACTERS,
+<strong>CHARACTER_LENGTH</strong>,
+CHARACTER_SET_CATALOG,
+CHARACTER_SET_NAME,
+CHARACTER_SET_SCHEMA,
+<strong>CHAR_LENGTH</strong>,
+<strong>CHECK</strong>,
+<strong>CLASSIFIER</strong>,
+CLASS_ORIGIN,
+<strong>CLOB</strong>,
+<strong>CLOSE</strong>,
+<strong>COALESCE</strong>,
+COBOL,
+<strong>COLLATE</strong>,
+COLLATION,
+COLLATION_CATALOG,
+COLLATION_NAME,
+COLLATION_SCHEMA,
+<strong>COLLECT</strong>,
+<strong>COLUMN</strong>,
+COLUMN_NAME,
+COMMAND_FUNCTION,
+COMMAND_FUNCTION_CODE,
+<strong>COMMIT</strong>,
+COMMITTED,
+<strong>CONDITION</strong>,
+CONDITIONAL,
+CONDITION_NUMBER,
+<strong>CONNECT</strong>,
+CONNECTION,
+CONNECTION_NAME,
+<strong>CONSTRAINT</strong>,
+CONSTRAINTS,
+CONSTRAINT_CATALOG,
+CONSTRAINT_NAME,
+CONSTRAINT_SCHEMA,
+CONSTRUCTOR,
+<strong>CONTAINS</strong>,
+CONTINUE,
+<strong>CONVERT</strong>,
+<strong>CORR</strong>,
+<strong>CORRESPONDING</strong>,
+<strong>COUNT</strong>,
+<strong>COVAR_POP</strong>,
+<strong>COVAR_SAMP</strong>,
+<strong>CREATE</strong>,
+<strong>CROSS</strong>,
+<strong>CUBE</strong>,
+<strong>CUME_DIST</strong>,
+<strong>CURRENT</strong>,
+<strong>CURRENT_CATALOG</strong>,
+<strong>CURRENT_DATE</strong>,
+<strong>CURRENT_DEFAULT_TRANSFORM_GROUP</strong>,
+<strong>CURRENT_PATH</strong>,
+<strong>CURRENT_ROLE</strong>,
+<strong>CURRENT_ROW</strong>,
+<strong>CURRENT_SCHEMA</strong>,
+<strong>CURRENT_TIME</strong>,
+<strong>CURRENT_TIMESTAMP</strong>,
+<strong>CURRENT_TRANSFORM_GROUP_FOR_TYPE</strong>,
+<strong>CURRENT_USER</strong>,
+<strong>CURSOR</strong>,
+CURSOR_NAME,
+<strong>CYCLE</strong>,
+DATA,
+DATABASE,
+<strong>DATE</strong>,
+DATETIME_INTERVAL_CODE,
+DATETIME_INTERVAL_PRECISION,
+<strong>DAY</strong>,
+DAYS,
+<strong>DEALLOCATE</strong>,
+<strong>DEC</strong>,
+DECADE,
+<strong>DECIMAL</strong>,
+<strong>DECLARE</strong>,
+<strong>DEFAULT</strong>,
+DEFAULTS,
+DEFERRABLE,
+DEFERRED,
+<strong>DEFINE</strong>,
+DEFINED,
+DEFINER,
+DEGREE,
+<strong>DELETE</strong>,
+<strong>DENSE_RANK</strong>,
+DEPTH,
+<strong>DEREF</strong>,
+DERIVED,
+DESC,
+<strong>DESCRIBE</strong>,
+DESCRIPTION,
+DESCRIPTOR,
+<strong>DETERMINISTIC</strong>,
+DIAGNOSTICS,
+<strong>DISALLOW</strong>,
+<strong>DISCONNECT</strong>,
+DISPATCH,
+<strong>DISTINCT</strong>,
+DOMAIN,
+DOT,
+<strong>DOUBLE</strong>,
+DOW,
+DOY,
+<strong>DROP</strong>,
+<strong>DYNAMIC</strong>,
+DYNAMIC_FUNCTION,
+DYNAMIC_FUNCTION_CODE,
+<strong>EACH</strong>,
+<strong>ELEMENT</strong>,
+<strong>ELSE</strong>,
+<strong>EMPTY</strong>,
+ENCODING,
+<strong>END</strong>,
+<strong>END-EXEC</strong>,
+<strong>END_FRAME</strong>,
+<strong>END_PARTITION</strong>,
+EPOCH,
+<strong>EQUALS</strong>,
+ERROR,
+<strong>ESCAPE</strong>,
+<strong>EVERY</strong>,
+<strong>EXCEPT</strong>,
+EXCEPTION,
+EXCLUDE,
+EXCLUDING,
+<strong>EXEC</strong>,
+<strong>EXECUTE</strong>,
+<strong>EXISTS</strong>,
+<strong>EXP</strong>,
+<strong>EXPLAIN</strong>,
+<strong>EXTEND</strong>,
+<strong>EXTERNAL</strong>,
+<strong>EXTRACT</strong>,
+<strong>FALSE</strong>,
+<strong>FETCH</strong>,
+<strong>FILTER</strong>,
+FINAL,
+FIRST,
+<strong>FIRST_VALUE</strong>,
+<strong>FLOAT</strong>,
+<strong>FLOOR</strong>,
+FOLLOWING,
+<strong>FOR</strong>,
+<strong>FOREIGN</strong>,
+FORMAT,
+FORTRAN,
+FOUND,
+FRAC_SECOND,
+<strong>FRAME_ROW</strong>,
+<strong>FREE</strong>,
+<strong>FROM</strong>,
+<strong>FULL</strong>,
+<strong>FUNCTION</strong>,
+<strong>FUSION</strong>,
+G,
+GENERAL,
+GENERATED,
+GEOMETRY,
+<strong>GET</strong>,
+<strong>GLOBAL</strong>,
+GO,
+GOTO,
+<strong>GRANT</strong>,
+GRANTED,
+<strong>GROUP</strong>,
+<strong>GROUPING</strong>,
+<strong>GROUPS</strong>,
+GROUP_CONCAT,
+<strong>HAVING</strong>,
+HIERARCHY,
+<strong>HOLD</strong>,
+HOP,
+<strong>HOUR</strong>,
+HOURS,
+<strong>IDENTITY</strong>,
+IGNORE,
+ILIKE,
+IMMEDIATE,
+IMMEDIATELY,
+IMPLEMENTATION,
+<strong>IMPORT</strong>,
+<strong>IN</strong>,
+INCLUDE,
+INCLUDING,
+INCREMENT,
+<strong>INDICATOR</strong>,
+<strong>INITIAL</strong>,
+INITIALLY,
+<strong>INNER</strong>,
+<strong>INOUT</strong>,
+INPUT,
+<strong>INSENSITIVE</strong>,
+<strong>INSERT</strong>,
+INSTANCE,
+INSTANTIABLE,
+<strong>INT</strong>,
+<strong>INTEGER</strong>,
+<strong>INTERSECT</strong>,
+<strong>INTERSECTION</strong>,
+<strong>INTERVAL</strong>,
+<strong>INTO</strong>,
+INVOKER,
+<strong>IS</strong>,
+ISODOW,
+ISOLATION,
+ISOYEAR,
+JAVA,
+<strong>JOIN</strong>,
+JSON,
+<strong>JSON_ARRAY</strong>,
+<strong>JSON_ARRAYAGG</strong>,
+<strong>JSON_EXISTS</strong>,
+<strong>JSON_OBJECT</strong>,
+<strong>JSON_OBJECTAGG</strong>,
+<strong>JSON_QUERY</strong>,
+<strong>JSON_VALUE</strong>,
+K,
+KEY,
+KEY_MEMBER,
+KEY_TYPE,
+LABEL,
+<strong>LAG</strong>,
+<strong>LANGUAGE</strong>,
+<strong>LARGE</strong>,
+LAST,
+<strong>LAST_VALUE</strong>,
+<strong>LATERAL</strong>,
+<strong>LEAD</strong>,
+<strong>LEADING</strong>,
+<strong>LEFT</strong>,
+LENGTH,
+LEVEL,
+LIBRARY,
+<strong>LIKE</strong>,
+<strong>LIKE_REGEX</strong>,
+<strong>LIMIT</strong>,
+<strong>LN</strong>,
+<strong>LOCAL</strong>,
+<strong>LOCALTIME</strong>,
+<strong>LOCALTIMESTAMP</strong>,
+LOCATOR,
+<strong>LOWER</strong>,
+M,
+MAP,
+<strong>MATCH</strong>,
+MATCHED,
+<strong>MATCHES</strong>,
+<strong>MATCH_NUMBER</strong>,
+<strong>MATCH_RECOGNIZE</strong>,
+<strong>MAX</strong>,
+MAXVALUE,
+<strong>MEASURES</strong>,
+<strong>MEMBER</strong>,
+<strong>MERGE</strong>,
+MESSAGE_LENGTH,
+MESSAGE_OCTET_LENGTH,
+MESSAGE_TEXT,
+<strong>METHOD</strong>,
+MICROSECOND,
+MILLENNIUM,
+MILLISECOND,
+<strong>MIN</strong>,
+<strong>MINUS</strong>,
+<strong>MINUTE</strong>,
+MINUTES,
+MINVALUE,
+<strong>MOD</strong>,
+<strong>MODIFIES</strong>,
+<strong>MODULE</strong>,
+<strong>MONTH</strong>,
+MONTHS,
+MORE,
+<strong>MULTISET</strong>,
+MUMPS,
+NAME,
+NAMES,
+NANOSECOND,
+<strong>NATIONAL</strong>,
+<strong>NATURAL</strong>,
+<strong>NCHAR</strong>,
+<strong>NCLOB</strong>,
+NESTING,
+<strong>NEW</strong>,
+<strong>NEXT</strong>,
+<strong>NO</strong>,
+<strong>NONE</strong>,
+<strong>NORMALIZE</strong>,
+NORMALIZED,
+<strong>NOT</strong>,
+<strong>NTH_VALUE</strong>,
+<strong>NTILE</strong>,
+<strong>NULL</strong>,
+NULLABLE,
+<strong>NULLIF</strong>,
+NULLS,
+NUMBER,
+<strong>NUMERIC</strong>,
+OBJECT,
+<strong>OCCURRENCES_REGEX</strong>,
+OCTETS,
+<strong>OCTET_LENGTH</strong>,
+<strong>OF</strong>,
+<strong>OFFSET</strong>,
+<strong>OLD</strong>,
+<strong>OMIT</strong>,
+<strong>ON</strong>,
+<strong>ONE</strong>,
+<strong>ONLY</strong>,
+<strong>OPEN</strong>,
+OPTION,
+OPTIONS,
+<strong>OR</strong>,
+<strong>ORDER</strong>,
+ORDERING,
+ORDINALITY,
+OTHERS,
+<strong>OUT</strong>,
+<strong>OUTER</strong>,
+OUTPUT,
+<strong>OVER</strong>,
+<strong>OVERLAPS</strong>,
+<strong>OVERLAY</strong>,
+OVERRIDING,
+PAD,
+<strong>PARAMETER</strong>,
+PARAMETER_MODE,
+PARAMETER_NAME,
+PARAMETER_ORDINAL_POSITION,
+PARAMETER_SPECIFIC_CATALOG,
+PARAMETER_SPECIFIC_NAME,
+PARAMETER_SPECIFIC_SCHEMA,
+PARTIAL,
+<strong>PARTITION</strong>,
+PASCAL,
+PASSING,
+PASSTHROUGH,
+PAST,
+PATH,
+<strong>PATTERN</strong>,
+<strong>PER</strong>,
+<strong>PERCENT</strong>,
+<strong>PERCENTILE_CONT</strong>,
+<strong>PERCENTILE_DISC</strong>,
+<strong>PERCENT_RANK</strong>,
+<strong>PERIOD</strong>,
+<strong>PERMUTE</strong>,
+PIVOT,
+PLACING,
+PLAN,
+PLI,
+<strong>PORTION</strong>,
+<strong>POSITION</strong>,
+<strong>POSITION_REGEX</strong>,
+<strong>POWER</strong>,
+<strong>PRECEDES</strong>,
+PRECEDING,
+<strong>PRECISION</strong>,
+<strong>PREPARE</strong>,
+PRESERVE,
+<strong>PREV</strong>,
+<strong>PRIMARY</strong>,
+PRIOR,
+PRIVILEGES,
+<strong>PROCEDURE</strong>,
+PUBLIC,
+QUARTER,
+<strong>RANGE</strong>,
+<strong>RANK</strong>,
+READ,
+<strong>READS</strong>,
+<strong>REAL</strong>,
+<strong>RECURSIVE</strong>,
+<strong>REF</strong>,
+<strong>REFERENCES</strong>,
+<strong>REFERENCING</strong>,
+<strong>REGR_AVGX</strong>,
+<strong>REGR_AVGY</strong>,
+<strong>REGR_COUNT</strong>,
+<strong>REGR_INTERCEPT</strong>,
+<strong>REGR_R2</strong>,
+<strong>REGR_SLOPE</strong>,
+<strong>REGR_SXX</strong>,
+<strong>REGR_SXY</strong>,
+<strong>REGR_SYY</strong>,
+RELATIVE,
+<strong>RELEASE</strong>,
+REPEATABLE,
+REPLACE,
+<strong>RESET</strong>,
+RESPECT,
+RESTART,
+RESTRICT,
+<strong>RESULT</strong>,
+<strong>RETURN</strong>,
+RETURNED_CARDINALITY,
+RETURNED_LENGTH,
+RETURNED_OCTET_LENGTH,
+RETURNED_SQLSTATE,
+RETURNING,
+<strong>RETURNS</strong>,
+<strong>REVOKE</strong>,
+<strong>RIGHT</strong>,
+RLIKE,
+ROLE,
+<strong>ROLLBACK</strong>,
+<strong>ROLLUP</strong>,
+ROUTINE,
+ROUTINE_CATALOG,
+ROUTINE_NAME,
+ROUTINE_SCHEMA,
+<strong>ROW</strong>,
+<strong>ROWS</strong>,
+ROW_COUNT,
+<strong>ROW_NUMBER</strong>,
+<strong>RUNNING</strong>,
+<strong>SAVEPOINT</strong>,
+SCALAR,
+SCALE,
+SCHEMA,
+SCHEMA_NAME,
+<strong>SCOPE</strong>,
+SCOPE_CATALOGS,
+SCOPE_NAME,
+SCOPE_SCHEMA,
+<strong>SCROLL</strong>,
+<strong>SEARCH</strong>,
+<strong>SECOND</strong>,
+SECONDS,
+SECTION,
+SECURITY,
+<strong>SEEK</strong>,
+<strong>SELECT</strong>,
+SELF,
+<strong>SENSITIVE</strong>,
+SEPARATOR,
+SEQUENCE,
+SERIALIZABLE,
+SERVER,
+SERVER_NAME,
+SESSION,
+<strong>SESSION_USER</strong>,
+<strong>SET</strong>,
+SETS,
+<strong>SHOW</strong>,
+<strong>SIMILAR</strong>,
+SIMPLE,
+SIZE,
+<strong>SKIP</strong>,
+<strong>SMALLINT</strong>,
+<strong>SOME</strong>,
+SOURCE,
+SPACE,
+<strong>SPECIFIC</strong>,
+<strong>SPECIFICTYPE</strong>,
+SPECIFIC_NAME,
+<strong>SQL</strong>,
+<strong>SQLEXCEPTION</strong>,
+<strong>SQLSTATE</strong>,
+<strong>SQLWARNING</strong>,
+SQL_BIGINT,
+SQL_BINARY,
+SQL_BIT,
+SQL_BLOB,
+SQL_BOOLEAN,
+SQL_CHAR,
+SQL_CLOB,
+SQL_DATE,
+SQL_DECIMAL,
+SQL_DOUBLE,
+SQL_FLOAT,
+SQL_INTEGER,
+SQL_INTERVAL_DAY,
+SQL_INTERVAL_DAY_TO_HOUR,
+SQL_INTERVAL_DAY_TO_MINUTE,
+SQL_INTERVAL_DAY_TO_SECOND,
+SQL_INTERVAL_HOUR,
+SQL_INTERVAL_HOUR_TO_MINUTE,
+SQL_INTERVAL_HOUR_TO_SECOND,
+SQL_INTERVAL_MINUTE,
+SQL_INTERVAL_MINUTE_TO_SECOND,
+SQL_INTERVAL_MONTH,
+SQL_INTERVAL_SECOND,
+SQL_INTERVAL_YEAR,
+SQL_INTERVAL_YEAR_TO_MONTH,
+SQL_LONGVARBINARY,
+SQL_LONGVARCHAR,
+SQL_LONGVARNCHAR,
+SQL_NCHAR,
+SQL_NCLOB,
+SQL_NUMERIC,
+SQL_NVARCHAR,
+SQL_REAL,
+SQL_SMALLINT,
+SQL_TIME,
+SQL_TIMESTAMP,
+SQL_TINYINT,
+SQL_TSI_DAY,
+SQL_TSI_FRAC_SECOND,
+SQL_TSI_HOUR,
+SQL_TSI_MICROSECOND,
+SQL_TSI_MINUTE,
+SQL_TSI_MONTH,
+SQL_TSI_QUARTER,
+SQL_TSI_SECOND,
+SQL_TSI_WEEK,
+SQL_TSI_YEAR,
+SQL_VARBINARY,
+SQL_VARCHAR,
+<strong>SQRT</strong>,
+<strong>START</strong>,
+STATE,
+STATEMENT,
+<strong>STATIC</strong>,
+<strong>STDDEV_POP</strong>,
+<strong>STDDEV_SAMP</strong>,
+<strong>STREAM</strong>,
+STRING_AGG,
+STRUCTURE,
+STYLE,
+SUBCLASS_ORIGIN,
+<strong>SUBMULTISET</strong>,
+<strong>SUBSET</strong>,
+SUBSTITUTE,
+<strong>SUBSTRING</strong>,
+<strong>SUBSTRING_REGEX</strong>,
+<strong>SUCCEEDS</strong>,
+<strong>SUM</strong>,
+<strong>SYMMETRIC</strong>,
+<strong>SYSTEM</strong>,
+<strong>SYSTEM_TIME</strong>,
+<strong>SYSTEM_USER</strong>,
+<strong>TABLE</strong>,
+<strong>TABLESAMPLE</strong>,
+TABLE_NAME,
+TEMPORARY,
+<strong>THEN</strong>,
+TIES,
+<strong>TIME</strong>,
+<strong>TIMESTAMP</strong>,
+TIMESTAMPADD,
+TIMESTAMPDIFF,
+<strong>TIMEZONE_HOUR</strong>,
+<strong>TIMEZONE_MINUTE</strong>,
+<strong>TINYINT</strong>,
+<strong>TO</strong>,
+TOP_LEVEL_COUNT,
+<strong>TRAILING</strong>,
+TRANSACTION,
+TRANSACTIONS_ACTIVE,
+TRANSACTIONS_COMMITTED,
+TRANSACTIONS_ROLLED_BACK,
+TRANSFORM,
+TRANSFORMS,
+<strong>TRANSLATE</strong>,
+<strong>TRANSLATE_REGEX</strong>,
+<strong>TRANSLATION</strong>,
+<strong>TREAT</strong>,
+<strong>TRIGGER</strong>,
+TRIGGER_CATALOG,
+TRIGGER_NAME,
+TRIGGER_SCHEMA,
+<strong>TRIM</strong>,
+<strong>TRIM_ARRAY</strong>,
+<strong>TRUE</strong>,
+<strong>TRUNCATE</strong>,
+TUMBLE,
+TYPE,
+<strong>UESCAPE</strong>,
+UNBOUNDED,
+UNCOMMITTED,
+UNCONDITIONAL,
+UNDER,
+<strong>UNION</strong>,
+<strong>UNIQUE</strong>,
+<strong>UNKNOWN</strong>,
+UNNAMED,
+<strong>UNNEST</strong>,
+UNPIVOT,
+<strong>UPDATE</strong>,
+<strong>UPPER</strong>,
+<strong>UPSERT</strong>,
+USAGE,
+<strong>USER</strong>,
+USER_DEFINED_TYPE_CATALOG,
+USER_DEFINED_TYPE_CODE,
+USER_DEFINED_TYPE_NAME,
+USER_DEFINED_TYPE_SCHEMA,
+<strong>USING</strong>,
+UTF16,
+UTF32,
+UTF8,
+<strong>VALUE</strong>,
+<strong>VALUES</strong>,
+<strong>VALUE_OF</strong>,
+<strong>VARBINARY</strong>,
+<strong>VARCHAR</strong>,
+<strong>VARYING</strong>,
+<strong>VAR_POP</strong>,
+<strong>VAR_SAMP</strong>,
+VERSION,
+<strong>VERSIONING</strong>,
+VIEW,
+WEEK,
+<strong>WHEN</strong>,
+<strong>WHENEVER</strong>,
+<strong>WHERE</strong>,
+<strong>WIDTH_BUCKET</strong>,
+<strong>WINDOW</strong>,
+<strong>WITH</strong>,
+<strong>WITHIN</strong>,
+<strong>WITHOUT</strong>,
+WORK,
+WRAPPER,
+WRITE,
+XML,
+<strong>YEAR</strong>,
+YEARS,
+ZONE.</p>
+
+<h2 id="identifiers">Identifiers</h2>
+
+<p>Identifiers are the names of tables, columns and other metadata
+elements used in a SQL query.</p>
+
+<p>Unquoted identifiers, such as emp, must start with a letter and can
+only contain letters, digits, and underscores. They are implicitly
+converted to upper case.</p>
+
+<p>Quoted identifiers, such as <code class="language-plaintext highlighter-rouge">"Employee Name"</code>, start and end with
+double quotes.  They may contain virtually any character, including
+spaces and other punctuation.  If you wish to include a double quote
+in an identifier, use another double quote to escape it, like this:
+<code class="language-plaintext highlighter-rouge">"An employee called ""Fred""."</code>.</p>
+
+<p>In Calcite, matching identifiers to the name of the referenced object is
+case-sensitive.  But remember that unquoted identifiers are implicitly
+converted to upper case before matching, and if the object it refers
+to was created using an unquoted identifier for its name, then its
+name will have been converted to upper case also.</p>
+
+<h2 id="data-types">Data types</h2>
+
+<h3 id="scalar-types">Scalar types</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Data type</th>
+      <th style="text-align: left">Description</th>
+      <th style="text-align: left">Range and example literals</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">BOOLEAN</td>
+      <td style="text-align: left">Logical values</td>
+      <td style="text-align: left">Values: TRUE, FALSE, UNKNOWN</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TINYINT</td>
+      <td style="text-align: left">1 byte signed integer</td>
+      <td style="text-align: left">Range is -128 to 127</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SMALLINT</td>
+      <td style="text-align: left">2 byte signed integer</td>
+      <td style="text-align: left">Range is -32768 to 32767</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">INTEGER, INT</td>
+      <td style="text-align: left">4 byte signed integer</td>
+      <td style="text-align: left">Range is -2147483648 to 2147483647</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BIGINT</td>
+      <td style="text-align: left">8 byte signed integer</td>
+      <td style="text-align: left">Range is -9223372036854775808 to 9223372036854775807</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DECIMAL(p, s)</td>
+      <td style="text-align: left">Fixed point</td>
+      <td style="text-align: left">Example: 123.45 is a DECIMAL(5, 2) value.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">NUMERIC</td>
+      <td style="text-align: left">Fixed point</td>
+      <td style="text-align: left"> </td>
+    </tr>
+    <tr>
+      <td style="text-align: left">REAL, FLOAT</td>
+      <td style="text-align: left">4 byte floating point</td>
+      <td style="text-align: left">6 decimal digits precision</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DOUBLE</td>
+      <td style="text-align: left">8 byte floating point</td>
+      <td style="text-align: left">15 decimal digits precision</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CHAR(n), CHARACTER(n)</td>
+      <td style="text-align: left">Fixed-width character string</td>
+      <td style="text-align: left">‘Hello’, ‘’ (empty string), _latin1’Hello’, n’Hello’, _UTF16’Hello’, ‘Hello’ ‘there’ (literal split into multiple parts)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">VARCHAR(n), CHARACTER VARYING(n)</td>
+      <td style="text-align: left">Variable-length character string</td>
+      <td style="text-align: left">As CHAR(n)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BINARY(n)</td>
+      <td style="text-align: left">Fixed-width binary string</td>
+      <td style="text-align: left">x’45F0AB’, x’’ (empty binary string), x’AB’ ‘CD’ (multi-part binary string literal)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">VARBINARY(n), BINARY VARYING(n)</td>
+      <td style="text-align: left">Variable-length binary string</td>
+      <td style="text-align: left">As BINARY(n)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DATE</td>
+      <td style="text-align: left">Date</td>
+      <td style="text-align: left">Example: DATE ‘1969-07-20’</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIME</td>
+      <td style="text-align: left">Time of day</td>
+      <td style="text-align: left">Example: TIME ‘20:17:40’</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIMESTAMP [ WITHOUT TIME ZONE ]</td>
+      <td style="text-align: left">Date and time</td>
+      <td style="text-align: left">Example: TIMESTAMP ‘1969-07-20 20:17:40’</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIMESTAMP WITH LOCAL TIME ZONE</td>
+      <td style="text-align: left">Date and time with local time zone</td>
+      <td style="text-align: left">Example: TIMESTAMP ‘1969-07-20 20:17:40 America/Los Angeles’</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIMESTAMP WITH TIME ZONE</td>
+      <td style="text-align: left">Date and time with time zone</td>
+      <td style="text-align: left">Example: TIMESTAMP ‘1969-07-20 20:17:40 America/Los Angeles’</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">INTERVAL timeUnit [ TO timeUnit ]</td>
+      <td style="text-align: left">Date time interval</td>
+      <td style="text-align: left">Examples: INTERVAL ‘1-5’ YEAR TO MONTH, INTERVAL ‘45’ DAY, INTERVAL ‘1 2:34:56.789’ DAY TO SECOND</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">GEOMETRY</td>
+      <td style="text-align: left">Geometry</td>
+      <td style="text-align: left">Examples: ST_GeomFromText(‘POINT (30 10)’)</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Where:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">timeUnit</span><span class="p">:</span>
+  <span class="n">MILLENNIUM</span> <span class="o">|</span> <span class="n">CENTURY</span> <span class="o">|</span> <span class="n">DECADE</span> <span class="o">|</span> <span class="nb">YEAR</span> <span class="o">|</span> <span class="n">QUARTER</span> <span class="o">|</span> <span class="k">MONTH</span> <span class="o">|</span> <span class="n">WEEK</span> <span class="o">|</span> <span class="n">DOY</span> <span class="o">|</span> <span class="n">DOW</span> <span class="o">|</span> [...]
+
+<p>Note:</p>
+
+<ul>
+  <li>DATE, TIME and TIMESTAMP have no time zone. For those types, there is not
+even an implicit time zone, such as UTC (as in Java) or the local time zone.
+It is left to the user or application to supply a time zone. In turn,
+TIMESTAMP WITH LOCAL TIME ZONE does not store the time zone internally, but
+it will rely on the supplied time zone to provide correct semantics.</li>
+  <li>GEOMETRY is allowed only in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#allowGeometry--">conformance levels</a>.</li>
+  <li>Interval literals may only use time units
+YEAR, MONTH, DAY, HOUR, MINUTE and SECOND. In certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#allowPluralTimeUnits--">conformance levels</a>,
+we also allow their plurals, YEARS, MONTHS, DAYS, HOURS, MINUTES and SECONDS.</li>
+</ul>
+
+<h3 id="non-scalar-types">Non-scalar types</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Type</th>
+      <th style="text-align: left">Description</th>
+      <th style="text-align: left">Example literals</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">ANY</td>
+      <td style="text-align: left">The union of all types</td>
+      <td style="text-align: left"> </td>
+    </tr>
+    <tr>
+      <td style="text-align: left">UNKNOWN</td>
+      <td style="text-align: left">A value of an unknown type; used as a placeholder</td>
+      <td style="text-align: left"> </td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ROW</td>
+      <td style="text-align: left">Row with 1 or more columns</td>
+      <td style="text-align: left">Example: Row(f0 int null, f1 varchar)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MAP</td>
+      <td style="text-align: left">Collection of keys mapped to values</td>
+      <td style="text-align: left"> </td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MULTISET</td>
+      <td style="text-align: left">Unordered collection that may contain duplicates</td>
+      <td style="text-align: left">Example: int multiset</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ARRAY</td>
+      <td style="text-align: left">Ordered, contiguous collection that may contain duplicates</td>
+      <td style="text-align: left">Example: varchar(10) array</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURSOR</td>
+      <td style="text-align: left">Cursor over the result of executing a query</td>
+      <td style="text-align: left"> </td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Note:</p>
+
+<ul>
+  <li>Every <code class="language-plaintext highlighter-rouge">ROW</code> column type can have an optional [ NULL | NOT NULL ] suffix
+to indicate if this column type is nullable, default is not nullable.</li>
+</ul>
+
+<h3 id="spatial-types">Spatial types</h3>
+
+<p>Spatial data is represented as character strings encoded as
+<a href="https://en.wikipedia.org/wiki/Well-known_text">well-known text (WKT)</a>
+or binary strings encoded as
+<a href="https://en.wikipedia.org/wiki/Well-known_binary">well-known binary (WKB)</a>.</p>
+
+<p>Where you would use a literal, apply the <code class="language-plaintext highlighter-rouge">ST_GeomFromText</code> function,
+for example <code class="language-plaintext highlighter-rouge">ST_GeomFromText('POINT (30 10)')</code>.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Data type</th>
+      <th style="text-align: left">Type code</th>
+      <th style="text-align: left">Examples in WKT</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">GEOMETRY</td>
+      <td style="text-align: left">0</td>
+      <td style="text-align: left">generalization of Point, Curve, Surface, GEOMETRYCOLLECTION</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POINT</td>
+      <td style="text-align: left">1</td>
+      <td style="text-align: left">
+<code>ST_GeomFromText(​'POINT (30 10)')</code> is a point in 2D space; <code>ST_GeomFromText(​'POINT Z(30 10 2)')</code> is point in 3D space</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURVE</td>
+      <td style="text-align: left">13</td>
+      <td style="text-align: left">generalization of LINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LINESTRING</td>
+      <td style="text-align: left">2</td>
+      <td style="text-align: left"><code>ST_GeomFromText(​'LINESTRING (30 10, 10 30, 40 40)')</code></td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SURFACE</td>
+      <td style="text-align: left">14</td>
+      <td style="text-align: left">generalization of Polygon, PolyhedralSurface</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POLYGON</td>
+      <td style="text-align: left">3</td>
+      <td style="text-align: left">
+<code>ST_GeomFromText(​'POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))')</code> is a pentagon; <code>ST_GeomFromText(​'POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))')</code> is a pentagon with a quadrilateral hole</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POLYHEDRALSURFACE</td>
+      <td style="text-align: left">15</td>
+      <td style="text-align: left"> </td>
+    </tr>
+    <tr>
+      <td style="text-align: left">GEOMETRYCOLLECTION</td>
+      <td style="text-align: left">7</td>
+      <td style="text-align: left">a collection of zero or more GEOMETRY instances; a generalization of MULTIPOINT, MULTILINESTRING, MULTIPOLYGON</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MULTIPOINT</td>
+      <td style="text-align: left">4</td>
+      <td style="text-align: left">
+<code>ST_GeomFromText(​'MULTIPOINT ((10 40), (40 30), (20 20), (30 10))')</code> is equivalent to <code>ST_GeomFromText(​'MULTIPOINT (10 40, 40 30, 20 20, 30 10)')</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MULTICURVE</td>
+      <td style="text-align: left">-</td>
+      <td style="text-align: left">generalization of MULTILINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MULTILINESTRING</td>
+      <td style="text-align: left">5</td>
+      <td style="text-align: left"><code>ST_GeomFromText(​'MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))')</code></td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MULTISURFACE</td>
+      <td style="text-align: left">-</td>
+      <td style="text-align: left">generalization of MULTIPOLYGON</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MULTIPOLYGON</td>
+      <td style="text-align: left">6</td>
+      <td style="text-align: left"><code>ST_GeomFromText(​'MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))')</code></td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h2 id="operators-and-functions">Operators and functions</h2>
+
+<h3 id="operator-precedence">Operator precedence</h3>
+
+<p>The operator precedence and associativity, highest to lowest.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator</th>
+      <th style="text-align: left">Associativity</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">.</td>
+      <td style="text-align: left">left</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">::</td>
+      <td style="text-align: left">left</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">[ ] (collection element)</td>
+      <td style="text-align: left">left</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">+ - (unary plus, minus)</td>
+      <td style="text-align: left">right</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">* / % ||</td>
+      <td style="text-align: left">left</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">+ -</td>
+      <td style="text-align: left">left</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BETWEEN, IN, LIKE, SIMILAR, OVERLAPS, CONTAINS etc.</td>
+      <td style="text-align: left">-</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">&lt; &gt; = &lt;= &gt;= &lt;&gt; != &lt;=&gt;</td>
+      <td style="text-align: left">left</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">IS NULL, IS FALSE, IS NOT TRUE etc.</td>
+      <td style="text-align: left">-</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">NOT</td>
+      <td style="text-align: left">right</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">AND</td>
+      <td style="text-align: left">left</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">OR</td>
+      <td style="text-align: left">left</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Note that <code class="language-plaintext highlighter-rouge">::</code>,<code class="language-plaintext highlighter-rouge">&lt;=&gt;</code> is dialect-specific, but is shown in this table for
+completeness.</p>
+
+<h3 id="comparison-operators">Comparison operators</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">value1 = value2</td>
+      <td style="text-align: left">Equals</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 &lt;&gt; value2</td>
+      <td style="text-align: left">Not equal</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 != value2</td>
+      <td style="text-align: left">Not equal (only available at some conformance levels)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 &gt; value2</td>
+      <td style="text-align: left">Greater than</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 &gt;= value2</td>
+      <td style="text-align: left">Greater than or equal</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 &lt; value2</td>
+      <td style="text-align: left">Less than</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 &lt;= value2</td>
+      <td style="text-align: left">Less than or equal</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 &lt;=&gt; value2</td>
+      <td style="text-align: left">Whether two values are equal, treating null values as the same</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value IS NULL</td>
+      <td style="text-align: left">Whether <em>value</em> is null</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value IS NOT NULL</td>
+      <td style="text-align: left">Whether <em>value</em> is not null</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 IS DISTINCT FROM value2</td>
+      <td style="text-align: left">Whether two values are not equal, treating null values as the same</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 IS NOT DISTINCT FROM value2</td>
+      <td style="text-align: left">Whether two values are equal, treating null values as the same</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 BETWEEN value2 AND value3</td>
+      <td style="text-align: left">Whether <em>value1</em> is greater than or equal to <em>value2</em> and less than or equal to <em>value3</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value1 NOT BETWEEN value2 AND value3</td>
+      <td style="text-align: left">Whether <em>value1</em> is less than <em>value2</em> or greater than <em>value3</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">string1 LIKE string2 [ ESCAPE string3 ]</td>
+      <td style="text-align: left">Whether <em>string1</em> matches pattern <em>string2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">string1 NOT LIKE string2 [ ESCAPE string3 ]</td>
+      <td style="text-align: left">Whether <em>string1</em> does not match pattern <em>string2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">string1 SIMILAR TO string2 [ ESCAPE string3 ]</td>
+      <td style="text-align: left">Whether <em>string1</em> matches regular expression <em>string2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">string1 NOT SIMILAR TO string2 [ ESCAPE string3 ]</td>
+      <td style="text-align: left">Whether <em>string1</em> does not match regular expression <em>string2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value IN (value [, value]*)</td>
+      <td style="text-align: left">Whether <em>value</em> is equal to a value in a list</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value NOT IN (value [, value]*)</td>
+      <td style="text-align: left">Whether <em>value</em> is not equal to every value in a list</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value IN (sub-query)</td>
+      <td style="text-align: left">Whether <em>value</em> is equal to a row returned by <em>sub-query</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value NOT IN (sub-query)</td>
+      <td style="text-align: left">Whether <em>value</em> is not equal to every row returned by <em>sub-query</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value comparison SOME (sub-query)</td>
+      <td style="text-align: left">Whether <em>value</em> <em>comparison</em> at least one row returned by <em>sub-query</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value comparison ANY (sub-query)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">SOME</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value comparison ALL (sub-query)</td>
+      <td style="text-align: left">Whether <em>value</em> <em>comparison</em> every row returned by <em>sub-query</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">EXISTS (sub-query)</td>
+      <td style="text-align: left">Whether <em>sub-query</em> returns at least one row</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">UNIQUE (sub-query)</td>
+      <td style="text-align: left">Whether the rows returned by <em>sub-query</em> are unique (ignoring null values)</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">comp</span><span class="p">:</span>
+      <span class="o">=</span>
+  <span class="o">|</span>   <span class="o">&lt;&gt;</span>
+  <span class="o">|</span>   <span class="o">&gt;</span>
+  <span class="o">|</span>   <span class="o">&gt;=</span>
+  <span class="o">|</span>   <span class="o">&lt;</span>
+  <span class="o">|</span>   <span class="o">&lt;=</span>
+  <span class="o">|</span>   <span class="o">&lt;=&gt;</span></code></pre></figure>
+
+<h3 id="logical-operators">Logical operators</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">boolean1 OR boolean2</td>
+      <td style="text-align: left">Whether <em>boolean1</em> is TRUE or <em>boolean2</em> is TRUE</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">boolean1 AND boolean2</td>
+      <td style="text-align: left">Whether <em>boolean1</em> and <em>boolean2</em> are both TRUE</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">NOT boolean</td>
+      <td style="text-align: left">Whether <em>boolean</em> is not TRUE; returns UNKNOWN if <em>boolean</em> is UNKNOWN</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">boolean IS FALSE</td>
+      <td style="text-align: left">Whether <em>boolean</em> is FALSE; returns FALSE if <em>boolean</em> is UNKNOWN</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">boolean IS NOT FALSE</td>
+      <td style="text-align: left">Whether <em>boolean</em> is not FALSE; returns TRUE if <em>boolean</em> is UNKNOWN</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">boolean IS TRUE</td>
+      <td style="text-align: left">Whether <em>boolean</em> is TRUE; returns FALSE if <em>boolean</em> is UNKNOWN</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">boolean IS NOT TRUE</td>
+      <td style="text-align: left">Whether <em>boolean</em> is not TRUE; returns TRUE if <em>boolean</em> is UNKNOWN</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">boolean IS UNKNOWN</td>
+      <td style="text-align: left">Whether <em>boolean</em> is UNKNOWN</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">boolean IS NOT UNKNOWN</td>
+      <td style="text-align: left">Whether <em>boolean</em> is not UNKNOWN</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="arithmetic-operators-and-functions">Arithmetic operators and functions</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">+ numeric</td>
+      <td style="text-align: left">Returns <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">- numeric</td>
+      <td style="text-align: left">Returns negative <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">numeric1 + numeric2</td>
+      <td style="text-align: left">Returns <em>numeric1</em> plus <em>numeric2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">numeric1 - numeric2</td>
+      <td style="text-align: left">Returns <em>numeric1</em> minus <em>numeric2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">numeric1 * numeric2</td>
+      <td style="text-align: left">Returns <em>numeric1</em> multiplied by <em>numeric2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">numeric1 / numeric2</td>
+      <td style="text-align: left">Returns <em>numeric1</em> divided by <em>numeric2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">numeric1 % numeric2</td>
+      <td style="text-align: left">As <em>MOD(numeric1, numeric2)</em> (only in certain <a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#isPercentRemainderAllowed--">conformance levels</a>)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POWER(numeric1, numeric2)</td>
+      <td style="text-align: left">Returns <em>numeric1</em> raised to the power of <em>numeric2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ABS(numeric)</td>
+      <td style="text-align: left">Returns the absolute value of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MOD(numeric1, numeric2)</td>
+      <td style="text-align: left">Returns the remainder (modulus) of <em>numeric1</em> divided by <em>numeric2</em>. The result is negative only if <em>numeric1</em> is negative</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SQRT(numeric)</td>
+      <td style="text-align: left">Returns the square root of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LN(numeric)</td>
+      <td style="text-align: left">Returns the natural logarithm (base <em>e</em>) of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LOG10(numeric)</td>
+      <td style="text-align: left">Returns the base 10 logarithm of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">EXP(numeric)</td>
+      <td style="text-align: left">Returns <em>e</em> raised to the power of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CEIL(numeric)</td>
+      <td style="text-align: left">Rounds <em>numeric</em> up, returning the smallest integer that is greater than or equal to <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">FLOOR(numeric)</td>
+      <td style="text-align: left">Rounds <em>numeric</em> down, returning the largest integer that is less than or equal to <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">RAND([seed])</td>
+      <td style="text-align: left">Generates a random double between 0 and 1 inclusive, optionally initializing the random number generator with <em>seed</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">RAND_INTEGER([seed, ] numeric)</td>
+      <td style="text-align: left">Generates a random integer between 0 and <em>numeric</em> - 1 inclusive, optionally initializing the random number generator with <em>seed</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ACOS(numeric)</td>
+      <td style="text-align: left">Returns the arc cosine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ASIN(numeric)</td>
+      <td style="text-align: left">Returns the arc sine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ATAN(numeric)</td>
+      <td style="text-align: left">Returns the arc tangent of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ATAN2(numeric, numeric)</td>
+      <td style="text-align: left">Returns the arc tangent of the <em>numeric</em> coordinates</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CBRT(numeric)</td>
+      <td style="text-align: left">Returns the cube root of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COS(numeric)</td>
+      <td style="text-align: left">Returns the cosine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COT(numeric)</td>
+      <td style="text-align: left">Returns the cotangent of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DEGREES(numeric)</td>
+      <td style="text-align: left">Converts <em>numeric</em> from radians to degrees</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">PI()</td>
+      <td style="text-align: left">Returns a value that is closer than any other value to <em>pi</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">RADIANS(numeric)</td>
+      <td style="text-align: left">Converts <em>numeric</em> from degrees to radians</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ROUND(numeric1 [, numeric2])</td>
+      <td style="text-align: left">Rounds <em>numeric1</em> to optionally <em>numeric2</em> (if not specified 0) places right to the decimal point</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SIGN(numeric)</td>
+      <td style="text-align: left">Returns the signum of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SIN(numeric)</td>
+      <td style="text-align: left">Returns the sine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TAN(numeric)</td>
+      <td style="text-align: left">Returns the tangent of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TRUNCATE(numeric1 [, numeric2])</td>
+      <td style="text-align: left">Truncates <em>numeric1</em> to optionally <em>numeric2</em> (if not specified 0) places right to the decimal point</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="character-string-operators-and-functions">Character string operators and functions</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">string || string</td>
+      <td style="text-align: left">Concatenates two character strings</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CHAR_LENGTH(string)</td>
+      <td style="text-align: left">Returns the number of characters in a character string</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CHARACTER_LENGTH(string)</td>
+      <td style="text-align: left">As CHAR_LENGTH(<em>string</em>)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">UPPER(string)</td>
+      <td style="text-align: left">Returns a character string converted to upper case</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LOWER(string)</td>
+      <td style="text-align: left">Returns a character string converted to lower case</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POSITION(string1 IN string2)</td>
+      <td style="text-align: left">Returns the position of the first occurrence of <em>string1</em> in <em>string2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POSITION(string1 IN string2 FROM integer)</td>
+      <td style="text-align: left">Returns the position of the first occurrence of <em>string1</em> in <em>string2</em> starting at a given point (not standard SQL)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TRIM( { BOTH | LEADING | TRAILING } string1 FROM string2)</td>
+      <td style="text-align: left">Removes the longest string containing only the characters in <em>string1</em> from the start/end/both ends of <em>string1</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ])</td>
+      <td style="text-align: left">Replaces a substring of <em>string1</em> with <em>string2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SUBSTRING(string FROM integer)</td>
+      <td style="text-align: left">Returns a substring of a character string starting at a given point</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SUBSTRING(string FROM integer FOR integer)</td>
+      <td style="text-align: left">Returns a substring of a character string starting at a given point with a given length</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">INITCAP(string)</td>
+      <td style="text-align: left">Returns <em>string</em> with the first letter of each word converter to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>SUBSTRING(string FROM regexp FOR regexp)</li>
+</ul>
+
+<h3 id="binary-string-operators-and-functions">Binary string operators and functions</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">binary || binary</td>
+      <td style="text-align: left">Concatenates two binary strings</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">OCTET_LENGTH(binary)</td>
+      <td style="text-align: left">Returns the number of bytes in <em>binary</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POSITION(binary1 IN binary2)</td>
+      <td style="text-align: left">Returns the position of the first occurrence of <em>binary1</em> in <em>binary2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">POSITION(binary1 IN binary2 FROM integer)</td>
+      <td style="text-align: left">Returns the position of the first occurrence of <em>binary1</em> in <em>binary2</em> starting at a given point (not standard SQL)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">OVERLAY(binary1 PLACING binary2 FROM integer [ FOR integer2 ])</td>
+      <td style="text-align: left">Replaces a substring of <em>binary1</em> with <em>binary2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SUBSTRING(binary FROM integer)</td>
+      <td style="text-align: left">Returns a substring of <em>binary</em> starting at a given point</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SUBSTRING(binary FROM integer FOR integer)</td>
+      <td style="text-align: left">Returns a substring of <em>binary</em> starting at a given point with a given length</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="datetime-functions">Date/time functions</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">LOCALTIME</td>
+      <td style="text-align: left">Returns the current date and time in the session time zone in a value of datatype TIME</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LOCALTIME(precision)</td>
+      <td style="text-align: left">Returns the current date and time in the session time zone in a value of datatype TIME, with <em>precision</em> digits of precision</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LOCALTIMESTAMP</td>
+      <td style="text-align: left">Returns the current date and time in the session time zone in a value of datatype TIMESTAMP</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LOCALTIMESTAMP(precision)</td>
+      <td style="text-align: left">Returns the current date and time in the session time zone in a value of datatype TIMESTAMP, with <em>precision</em> digits of precision</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURRENT_TIME</td>
+      <td style="text-align: left">Returns the current time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURRENT_DATE</td>
+      <td style="text-align: left">Returns the current date in the session time zone, in a value of datatype DATE</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURRENT_TIMESTAMP</td>
+      <td style="text-align: left">Returns the current date and time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">EXTRACT(timeUnit FROM datetime)</td>
+      <td style="text-align: left">Extracts and returns the value of a specified datetime field from a datetime value expression</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">FLOOR(datetime TO timeUnit)</td>
+      <td style="text-align: left">Rounds <em>datetime</em> down to <em>timeUnit</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CEIL(datetime TO timeUnit)</td>
+      <td style="text-align: left">Rounds <em>datetime</em> up to <em>timeUnit</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">YEAR(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(YEAR FROM date)</code>. Returns an integer.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">QUARTER(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(QUARTER FROM date)</code>. Returns an integer between 1 and 4.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MONTH(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(MONTH FROM date)</code>. Returns an integer between 1 and 12.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">WEEK(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(WEEK FROM date)</code>. Returns an integer between 1 and 53.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DAYOFYEAR(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(DOY FROM date)</code>. Returns an integer between 1 and 366.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DAYOFMONTH(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(DAY FROM date)</code>. Returns an integer between 1 and 31.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DAYOFWEEK(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(DOW FROM date)</code>. Returns an integer between 1 and 7.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">HOUR(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(HOUR FROM date)</code>. Returns an integer between 0 and 23.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MINUTE(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(MINUTE FROM date)</code>. Returns an integer between 0 and 59.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SECOND(date)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(SECOND FROM date)</code>. Returns an integer between 0 and 59.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIMESTAMPADD(timeUnit, integer, datetime)</td>
+      <td style="text-align: left">Returns <em>datetime</em> with an interval of (signed) <em>integer</em> <em>timeUnit</em>s added. Equivalent to <code class="language-plaintext highlighter-rouge">datetime + INTERVAL 'integer' timeUnit</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIMESTAMPDIFF(timeUnit, datetime, datetime2)</td>
+      <td style="text-align: left">Returns the (signed) number of <em>timeUnit</em> intervals between <em>datetime</em> and <em>datetime2</em>. Equivalent to <code class="language-plaintext highlighter-rouge">(datetime2 - datetime) timeUnit</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LAST_DAY(date)</td>
+      <td style="text-align: left">Returns the date of the last day of the month in a value of datatype DATE; For example, it returns DATE’2020-02-29’ for both DATE’2020-02-10’ and TIMESTAMP’2020-02-10 10:10:10’</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Calls to niladic functions such as <code class="language-plaintext highlighter-rouge">CURRENT_DATE</code> do not accept parentheses in
+standard SQL. Calls with parentheses, such as <code class="language-plaintext highlighter-rouge">CURRENT_DATE()</code> are accepted in certain
+<a href="/javadocAggregate/org/apache/calcite/sql/validate/SqlConformance.html#allowNiladicParentheses--">conformance levels</a>.</p>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>CEIL(interval)</li>
+  <li>FLOOR(interval)</li>
+  <li>+ interval</li>
+  <li>- interval</li>
+  <li>interval + interval</li>
+  <li>interval - interval</li>
+  <li>interval / interval</li>
+</ul>
+
+<h3 id="system-functions">System functions</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">USER</td>
+      <td style="text-align: left">Equivalent to CURRENT_USER</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURRENT_USER</td>
+      <td style="text-align: left">User name of current execution context</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SESSION_USER</td>
+      <td style="text-align: left">Session user name</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SYSTEM_USER</td>
+      <td style="text-align: left">Returns the name of the current data store user as identified by the operating system</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURRENT_PATH</td>
+      <td style="text-align: left">Returns a character string representing the current lookup scope for references to user-defined routines and types</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURRENT_ROLE</td>
+      <td style="text-align: left">Returns the current active role</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CURRENT_SCHEMA</td>
+      <td style="text-align: left">Returns the current schema</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="conditional-functions-and-operators">Conditional functions and operators</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">CASE value<br>WHEN value1 [, value11 ]* THEN result1<br>[ WHEN valueN [, valueN1 ]* THEN resultN ]*<br>[ ELSE resultZ ]<br> END</td>
+      <td style="text-align: left">Simple case</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CASE<br>WHEN condition1 THEN result1<br>[ WHEN conditionN THEN resultN ]*<br>[ ELSE resultZ ]<br>END</td>
+      <td style="text-align: left">Searched case</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">NULLIF(value, value)</td>
+      <td style="text-align: left">Returns NULL if the values are the same.<br><br>For example, <code>NULLIF(5, 5)</code> returns NULL; <code>NULLIF(5, 0)</code> returns 5.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COALESCE(value, value [, value ]*)</td>
+      <td style="text-align: left">Provides a value if the first value is null.<br><br>For example, <code>COALESCE(NULL, 5)</code> returns 5.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="type-conversion">Type conversion</h3>
+
+<p>Generally an expression cannot contain values of different datatypes. For example, an expression cannot multiply 5 by 10 and then add ‘JULIAN’.
+However, Calcite supports both implicit and explicit conversion of values from one datatype to another.</p>
+
+<h4 id="implicit-and-explicit-type-conversion">Implicit and Explicit Type Conversion</h4>
+<p>Calcite recommends that you specify explicit conversions, rather than rely on implicit or automatic conversions, for these reasons:</p>
+
+<ul>
+  <li>SQL statements are easier to understand when you use explicit datatype conversion functions.</li>
+  <li>Implicit datatype conversion can have a negative impact on performance, especially if the datatype of a column value is converted to that of a constant rather than the other way around.</li>
+  <li>Implicit conversion depends on the context in which it occurs and may not work the same way in every case. For example, implicit conversion from a datetime value to a VARCHAR value may return an unexpected format.</li>
+</ul>
+
+<p>Algorithms for implicit conversion are subject to change across Calcite releases. Behavior of explicit conversions is more predictable.</p>
+
+<h4 id="explicit-type-conversion">Explicit Type Conversion</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">CAST(value AS type)</td>
+      <td style="text-align: left">Converts a value to a given type.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Supported data types syntax:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">type</span><span class="p">:</span>
+      <span class="n">typeName</span>
+      <span class="p">[</span> <span class="n">collectionsTypeName</span> <span class="p">]</span><span class="o">*</span>
+
+<span class="n">typeName</span><span class="p">:</span>
+      <span class="n">sqlTypeName</span>
+  <span class="o">|</span>   <span class="n">rowTypeName</span>
+  <span class="o">|</span>   <span class="n">compoundIdentifier</span>
+
+<span class="n">sqlTypeName</span><span class="p">:</span>
+      <span class="nb">char</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">]</span> <span class="p">[</span> <span class="n">charSet</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="nb">varchar</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">]</span> <span class="p">[</span> <span class="n">charSet</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="nb">DATE</span>
+  <span class="o">|</span>   <span class="nb">time</span>
+  <span class="o">|</span>   <span class="nb">timestamp</span>
+  <span class="o">|</span>   <span class="n">GEOMETRY</span>
+  <span class="o">|</span>   <span class="nb">decimal</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">[,</span> <span class="k">scale</span><span class="p">]</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="nb">BOOLEAN</span>
+  <span class="o">|</span>   <span class="nb">integer</span>
+  <span class="o">|</span>   <span class="nb">BINARY</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="nb">varbinary</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="nb">TINYINT</span>
+  <span class="o">|</span>   <span class="nb">SMALLINT</span>
+  <span class="o">|</span>   <span class="nb">BIGINT</span>
+  <span class="o">|</span>   <span class="nb">REAL</span>
+  <span class="o">|</span>   <span class="nb">double</span>
+  <span class="o">|</span>   <span class="nb">FLOAT</span>
+  <span class="o">|</span>   <span class="k">ANY</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">[,</span> <span class="k">scale</span><span class="p">]</span> <span class="p">]</span>
+
+<span class="n">collectionsTypeName</span><span class="p">:</span>
+      <span class="n">ARRAY</span> <span class="o">|</span> <span class="n">MULTISET</span>
+
+<span class="n">rowTypeName</span><span class="p">:</span>
+      <span class="k">ROW</span> <span class="s1">'('</span>
+      <span class="n">fieldName1</span> <span class="n">fieldType1</span> <span class="p">[</span> <span class="k">NULL</span> <span class="o">|</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="p">,</span> <span class="n">fieldName2</span> <span class="n">fieldType2</span> <span class="p">[</span> <span class="k">NULL</span> <span class="o">|</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="p">]</span> <span class="p">]</span><span class="o">*</span>
+      <span class="s1">')'</span>
+
+<span class="nb">char</span><span class="p">:</span>
+      <span class="nb">CHARACTER</span> <span class="o">|</span> <span class="nb">CHAR</span>
+
+<span class="nb">varchar</span><span class="p">:</span>
+      <span class="nb">char</span> <span class="nb">VARYING</span> <span class="o">|</span> <span class="nb">VARCHAR</span>
+
+<span class="nb">decimal</span><span class="p">:</span>
+      <span class="nb">DECIMAL</span> <span class="o">|</span> <span class="nb">DEC</span> <span class="o">|</span> <span class="nb">NUMERIC</span>
+
+<span class="nb">integer</span><span class="p">:</span>
+      <span class="nb">INTEGER</span> <span class="o">|</span> <span class="nb">INT</span>
+
+<span class="nb">varbinary</span><span class="p">:</span>
+      <span class="nb">BINARY</span> <span class="nb">VARYING</span> <span class="o">|</span> <span class="nb">VARBINARY</span>
+
+<span class="nb">double</span><span class="p">:</span>
+      <span class="nb">DOUBLE</span> <span class="p">[</span> <span class="nb">PRECISION</span> <span class="p">]</span>
+
+<span class="nb">time</span><span class="p">:</span>
+      <span class="nb">TIME</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">]</span> <span class="p">[</span> <span class="n">timeZone</span> <span class="p">]</span>
+
+<span class="nb">timestamp</span><span class="p">:</span>
+      <span class="nb">TIMESTAMP</span> <span class="p">[</span> <span class="nb">precision</span> <span class="p">]</span> <span class="p">[</span> <span class="n">timeZone</span> <span class="p">]</span>
+
+<span class="n">charSet</span><span class="p">:</span>
+      <span class="nb">CHARACTER</span> <span class="k">SET</span> <span class="n">charSetName</span>
+
+<span class="n">timeZone</span><span class="p">:</span>
+      <span class="k">WITHOUT</span> <span class="nb">TIME</span> <span class="k">ZONE</span>
+  <span class="o">|</span>   <span class="k">WITH</span> <span class="k">LOCAL</span> <span class="nb">TIME</span> <span class="k">ZONE</span></code></pre></figure>
+
+<h4 id="implicit-type-conversion">Implicit Type Conversion</h4>
+
+<p>Calcite automatically converts a value from one datatype to another
+when such a conversion makes sense. The table below is a matrix of
+Calcite type conversions. The table shows all possible conversions,
+without regard to the context in which it is made. The rules governing
+these details follow the table.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">FROM - TO</th>
+      <th style="text-align: left">NULL</th>
+      <th style="text-align: left">BOOLEAN</th>
+      <th style="text-align: left">TINYINT</th>
+      <th style="text-align: left">SMALLINT</th>
+      <th style="text-align: left">INT</th>
+      <th style="text-align: left">BIGINT</th>
+      <th style="text-align: left">DECIMAL</th>
+      <th style="text-align: left">FLOAT or REAL</th>
+      <th style="text-align: left">DOUBLE</th>
+      <th style="text-align: left">INTERVAL</th>
+      <th style="text-align: left">DATE</th>
+      <th style="text-align: left">TIME</th>
+      <th style="text-align: left">TIMESTAMP</th>
+      <th style="text-align: left">CHAR or VARCHAR</th>
+      <th style="text-align: left">BINARY or VARBINARY</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">NULL</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BOOLEAN</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TINYINT</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SMALLINT</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">INT</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BIGINT</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DECIMAL</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">FLOAT/REAL</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DOUBLE</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">INTERVAL</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DATE</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIME</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TIMESTAMP</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">x</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CHAR or VARCHAR</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BINARY or VARBINARY</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">x</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">e</td>
+      <td style="text-align: left">i</td>
+      <td style="text-align: left">i</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>i: implicit cast / e: explicit cast / x: not allowed</p>
+
+<h5 id="conversion-contexts-and-strategies">Conversion Contexts and Strategies</h5>
+
+<ul>
+  <li>Set operation (<code class="language-plaintext highlighter-rouge">UNION</code>, <code class="language-plaintext highlighter-rouge">EXCEPT</code>, <code class="language-plaintext highlighter-rouge">INTERSECT</code>): compare every branch
+row data type and find the common type of each fields pair;</li>
+  <li>Binary arithmetic expression (<code class="language-plaintext highlighter-rouge">+</code>, <code class="language-plaintext highlighter-rouge">-</code>, <code class="language-plaintext highlighter-rouge">&amp;</code>, <code class="language-plaintext highlighter-rouge">^</code>, <code class="language-plaintext highlighter-rouge">/</code>, <code class="language-plaintext highlighter-rouge">%</code>): promote
+string operand to data type of the other numeric operand;</li>
+  <li>Binary comparison (<code class="language-plaintext highlighter-rouge">=</code>, <code class="language-plaintext highlighter-rouge">&lt;</code>, <code class="language-plaintext highlighter-rouge">&lt;=</code>, <code class="language-plaintext highlighter-rouge">&lt;&gt;</code>, <code class="language-plaintext highlighter-rouge">&gt;</code>, <code class="language-plaintext highlighter-rouge">&gt;=</code>):
+if operands are <code class="language-plaintext highlighter-rouge">STRING</code> and <code class="language-plaintext highlighter-rouge">TIMESTAMP</code>, promote to <code class="language-plaintext highlighter-rouge">TIMESTAMP</code>;
+make <code class="language-plaintext highlighter-rouge">1 = true</code> and <code class="language-plaintext highlighter-rouge">0 = false</code> always evaluate to <code class="language-plaintext highlighter-rouge">TRUE</code>;
+if there is numeric type operand, find common type for both operands.</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">IN</code> sub-query: compare type of LHS and RHS, and find the common type;
+if it is struct type, find wider type for every field;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">IN</code> expression list: compare every expression to find the common type;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">CASE WHEN</code> expression or <code class="language-plaintext highlighter-rouge">COALESCE</code>: find the common wider type of the <code class="language-plaintext highlighter-rouge">THEN</code>
+and <code class="language-plaintext highlighter-rouge">ELSE</code> operands;</li>
+  <li>Character + <code class="language-plaintext highlighter-rouge">INTERVAL</code> or character - <code class="language-plaintext highlighter-rouge">INTERVAL</code>: promote character to
+<code class="language-plaintext highlighter-rouge">TIMESTAMP</code>;</li>
+  <li>Built-in function: look up the type families registered in the checker,
+find the family default type if checker rules allow it;</li>
+  <li>User-defined function (UDF): coerce based on the declared argument types
+of the <code class="language-plaintext highlighter-rouge">eval()</code> method;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">INSERT</code> and <code class="language-plaintext highlighter-rouge">UPDATE</code>: coerce a source field to counterpart target table
+field’s type if the two fields differ with type name or precision(scale).</li>
+</ul>
+
+<p>Note:</p>
+
+<p>Implicit type coercion of following cases are ignored:</p>
+
+<ul>
+  <li>One of the type is <code class="language-plaintext highlighter-rouge">ANY</code>;</li>
+  <li>Type coercion within <code class="language-plaintext highlighter-rouge">CHARACTER</code> types are always ignored,
+i.e. from <code class="language-plaintext highlighter-rouge">CHAR(20)</code> to <code class="language-plaintext highlighter-rouge">VARCHAR(30)</code>;</li>
+  <li>Type coercion from a numeric to another with higher precedence is ignored,
+i.e. from <code class="language-plaintext highlighter-rouge">INT</code> to <code class="language-plaintext highlighter-rouge">LONG</code>.</li>
+</ul>
+
+<h5 id="strategies-for-finding-common-type">Strategies for Finding Common Type</h5>
+
+<ul>
+  <li>If the operator has expected data types, just take them as the
+desired one. (e.g. the UDF would have <code class="language-plaintext highlighter-rouge">eval()</code> method which has
+reflection argument types);</li>
+  <li>If there is no expected data type but the data type families are
+registered, try to coerce the arguments to the family’s default data
+type, i.e. the String family will have a <code class="language-plaintext highlighter-rouge">VARCHAR</code> type;</li>
+  <li>If neither expected data type nor families are specified, try to
+find the tightest common type of the node types, i.e. <code class="language-plaintext highlighter-rouge">INTEGER</code> and
+<code class="language-plaintext highlighter-rouge">DOUBLE</code> will return <code class="language-plaintext highlighter-rouge">DOUBLE</code>, the numeric precision does not lose
+for this case;</li>
+  <li>If no tightest common type is found, try to find a wider type,
+i.e. <code class="language-plaintext highlighter-rouge">VARCHAR</code> and <code class="language-plaintext highlighter-rouge">INTEGER</code> will return <code class="language-plaintext highlighter-rouge">INTEGER</code>,
+we allow some precision loss when widening decimal to fractional,
+or promote to <code class="language-plaintext highlighter-rouge">VARCHAR</code> type.</li>
+</ul>
+
+<h3 id="value-constructors">Value constructors</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">ROW (value [, value ]*)</td>
+      <td style="text-align: left">Creates a row from a list of values.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">(value [, value ]* )</td>
+      <td style="text-align: left">Creates a row from a list of values.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">row ‘[’ index ‘]’</td>
+      <td style="text-align: left">Returns the element at a particular location in a row (1-based index).</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">row ‘[’ name ‘]’</td>
+      <td style="text-align: left">Returns the element of a row with a particular name.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">map ‘[’ key ‘]’</td>
+      <td style="text-align: left">Returns the element of a map with a particular key.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">array ‘[’ index ‘]’</td>
+      <td style="text-align: left">Returns the element at a particular location in an array (1-based index).</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ARRAY ‘[’ value [, value ]* ‘]’</td>
+      <td style="text-align: left">Creates an array from a list of values.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MAP ‘[’ key, value [, key, value ]* ‘]’</td>
+      <td style="text-align: left">Creates a map from a list of key-value pairs.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="collection-functions">Collection functions</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">ELEMENT(value)</td>
+      <td style="text-align: left">Returns the sole element of an array or multiset; null if the collection is empty; throws if it has more than one element.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">CARDINALITY(value)</td>
+      <td style="text-align: left">Returns the number of elements in an array or multiset.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">value MEMBER OF multiset</td>
+      <td style="text-align: left">Returns whether the <em>value</em> is a member of <em>multiset</em>.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset IS A SET</td>
+      <td style="text-align: left">Whether <em>multiset</em> is a set (has no duplicates).</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset IS NOT A SET</td>
+      <td style="text-align: left">Whether <em>multiset</em> is not a set (has duplicates).</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset IS EMPTY</td>
+      <td style="text-align: left">Whether <em>multiset</em> contains zero elements.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset IS NOT EMPTY</td>
+      <td style="text-align: left">Whether <em>multiset</em> contains one or more elements.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset SUBMULTISET OF multiset2</td>
+      <td style="text-align: left">Whether <em>multiset</em> is a submultiset of <em>multiset2</em>.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset NOT SUBMULTISET OF multiset2</td>
+      <td style="text-align: left">Whether <em>multiset</em> is not a submultiset of <em>multiset2</em>.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset MULTISET UNION [ ALL | DISTINCT ] multiset2</td>
+      <td style="text-align: left">Returns the union <em>multiset</em> and <em>multiset2</em>, eliminating duplicates if DISTINCT is specified (ALL is the default).</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset MULTISET INTERSECT [ ALL | DISTINCT ] multiset2</td>
+      <td style="text-align: left">Returns the intersection of <em>multiset</em> and <em>multiset2</em>, eliminating duplicates if DISTINCT is specified (ALL is the default).</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">multiset MULTISET EXCEPT [ ALL | DISTINCT ] multiset2</td>
+      <td style="text-align: left">Returns the difference of <em>multiset</em> and <em>multiset2</em>, eliminating duplicates if DISTINCT is specified (ALL is the default).</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>See also: the UNNEST relational operator converts a collection to a relation.</p>
+
+<h3 id="period-predicates">Period predicates</h3>
+
+<div class="scroll-table-style"><table>
+  <tr>
+    <th>Operator syntax</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>period1 CONTAINS datetime</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r15"></div>
+<div class="r2"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td>period1 CONTAINS period2</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r15"></div>
+<div class="r24"></div>
+</div>
+        <div class="gray">
+<div class="r15"></div>
+<div class="r13"></div>
+</div>
+        <div class="gray">
+<div class="r15"></div>
+<div class="r35"></div>
+</div>
+        <div class="gray">
+<div class="r15"></div>
+<div class="r15"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td>period1 OVERLAPS period2</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r15"></div>
+<div class="r24"></div>
+</div>
+        <div class="gray">
+<div class="r15"></div>
+<div class="r13"></div>
+</div>
+        <div class="gray">
+<div class="r15"></div>
+<div class="r35"></div>
+</div>
+        <div class="gray">
+<div class="r15"></div>
+<div class="r15"></div>
+</div>
+        <div class="gray">
+<div class="r24"></div>
+<div class="r15"></div>
+</div>
+        <div class="gray">
+<div class="r13"></div>
+<div class="r15"></div>
+</div>
+        <div class="gray">
+<div class="r35"></div>
+<div class="r15"></div>
+</div>
+        <div class="gray">
+<div class="r24"></div>
+<div class="r13"></div>
+</div>
+        <div class="gray">
+<div class="r13"></div>
+<div class="r24"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td>period1 EQUALS period2</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r15"></div>
+<div class="r15"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td>period1 PRECEDES period2</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r12"></div>
+<div class="r35"></div>
+</div>
+        <div class="gray">
+<div class="r13"></div>
+<div class="r35"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td>period1 IMMEDIATELY PRECEDES period2</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r13"></div>
+<div class="r35"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td>period1 SUCCEEDS period2</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r35"></div>
+<div class="r12"></div>
+</div>
+        <div class="gray">
+<div class="r35"></div>
+<div class="r13"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+  <tr>
+    <td>period1 IMMEDIATELY SUCCEEDS period2</td>
+    <td>
+      <div class="container">
+        <div class="gray">
+<div class="r35"></div>
+<div class="r13"></div>
+</div>
+      </div>
+    </td>
+  </tr>
+</table></div>
+
+<p>Where <em>period1</em> and <em>period2</em> are period expressions:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">period</span><span class="p">:</span>
+      <span class="p">(</span><span class="nb">datetime</span><span class="p">,</span> <span class="nb">datetime</span><span class="p">)</span>
+  <span class="o">|</span>   <span class="p">(</span><span class="nb">datetime</span><span class="p">,</span> <span class="n">interval</span><span class="p">)</span>
+  <span class="o">|</span>   <span class="n">PERIOD</span> <span class="p">(</span><span class="nb">datetime</span><span class="p">,</span> <span class="nb">datetime</span><span class="p">)</span>
+  <span class="o">|</span>   <span class="n">PERIOD</span> <span class="p">(</span><span class="nb">datetime</span><span class="p">,</span> <span class="n">interval</span><span class="p">)</span></code></pre></figure>
+
+<h3 id="jdbc-function-escape">JDBC function escape</h3>
+
+<h4 id="numeric">Numeric</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">{fn ABS(numeric)}</td>
+      <td style="text-align: left">Returns the absolute value of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn ACOS(numeric)}</td>
+      <td style="text-align: left">Returns the arc cosine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn ASIN(numeric)}</td>
+      <td style="text-align: left">Returns the arc sine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn ATAN(numeric)}</td>
+      <td style="text-align: left">Returns the arc tangent of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn ATAN2(numeric, numeric)}</td>
+      <td style="text-align: left">Returns the arc tangent of the <em>numeric</em> coordinates</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn CBRT(numeric)}</td>
+      <td style="text-align: left">Returns the cube root of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn CEILING(numeric)}</td>
+      <td style="text-align: left">Rounds <em>numeric</em> up, and returns the smallest number that is greater than or equal to <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn COS(numeric)}</td>
+      <td style="text-align: left">Returns the cosine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn COT(numeric)}</td>
+      <td style="text-align: left">Returns the cotangent of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn DEGREES(numeric)}</td>
+      <td style="text-align: left">Converts <em>numeric</em> from radians to degrees</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn EXP(numeric)}</td>
+      <td style="text-align: left">Returns <em>e</em> raised to the power of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn FLOOR(numeric)}</td>
+      <td style="text-align: left">Rounds <em>numeric</em> down, and returns the largest number that is less than or equal to <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LOG(numeric)}</td>
+      <td style="text-align: left">Returns the natural logarithm (base <em>e</em>) of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LOG10(numeric)}</td>
+      <td style="text-align: left">Returns the base-10 logarithm of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn MOD(numeric1, numeric2)}</td>
+      <td style="text-align: left">Returns the remainder (modulus) of <em>numeric1</em> divided by <em>numeric2</em>. The result is negative only if <em>numeric1</em> is negative</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn PI()}</td>
+      <td style="text-align: left">Returns a value that is closer than any other value to <em>pi</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn POWER(numeric1, numeric2)}</td>
+      <td style="text-align: left">Returns <em>numeric1</em> raised to the power of <em>numeric2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn RADIANS(numeric)}</td>
+      <td style="text-align: left">Converts <em>numeric</em> from degrees to radians</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn RAND(numeric)}</td>
+      <td style="text-align: left">Returns a random double using <em>numeric</em> as the seed value</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn ROUND(numeric1, numeric2)}</td>
+      <td style="text-align: left">Rounds <em>numeric1</em> to <em>numeric2</em> places right to the decimal point</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn SIGN(numeric)}</td>
+      <td style="text-align: left">Returns the signum of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn SIN(numeric)}</td>
+      <td style="text-align: left">Returns the sine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn SQRT(numeric)}</td>
+      <td style="text-align: left">Returns the square root of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn TAN(numeric)}</td>
+      <td style="text-align: left">Returns the tangent of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn TRUNCATE(numeric1, numeric2)}</td>
+      <td style="text-align: left">Truncates <em>numeric1</em> to <em>numeric2</em> places right to the decimal point</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="string">String</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">{fn ASCII(string)}</td>
+      <td style="text-align: left">Returns the ASCII code of the first character of <em>string</em>; if the first character is a non-ASCII character, returns its Unicode code point; returns 0 if <em>string</em> is empty</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn CHAR(integer)}</td>
+      <td style="text-align: left">Returns the character whose ASCII code is <em>integer</em> % 256, or null if <em>integer</em> &lt; 0</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn CONCAT(character, character)}</td>
+      <td style="text-align: left">Returns the concatenation of character strings</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn INSERT(string1, start, length, string2)}</td>
+      <td style="text-align: left">Inserts <em>string2</em> into a slot in <em>string1</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LCASE(string)}</td>
+      <td style="text-align: left">Returns a string in which all alphabetic characters in <em>string</em> have been converted to lower case</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LENGTH(string)}</td>
+      <td style="text-align: left">Returns the number of characters in a string</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LOCATE(string1, string2 [, integer])}</td>
+      <td style="text-align: left">Returns the position in <em>string2</em> of the first occurrence of <em>string1</em>. Searches from the beginning of <em>string2</em>, unless <em>integer</em> is specified.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LEFT(string, length)}</td>
+      <td style="text-align: left">Returns the leftmost <em>length</em> characters from <em>string</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn LTRIM(string)}</td>
+      <td style="text-align: left">Returns <em>string</em> with leading space characters removed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn REPLACE(string, search, replacement)}</td>
+      <td style="text-align: left">Returns a string in which all the occurrences of <em>search</em> in <em>string</em> are replaced with <em>replacement</em>; if <em>replacement</em> is the empty string, the occurrences of <em>search</em> are removed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn REVERSE(string)}</td>
+      <td style="text-align: left">Returns <em>string</em> with the order of the characters reversed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn RIGHT(string, length)}</td>
+      <td style="text-align: left">Returns the rightmost <em>length</em> characters from <em>string</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn RTRIM(string)}</td>
+      <td style="text-align: left">Returns <em>string</em> with trailing space characters removed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn SUBSTRING(string, offset, length)}</td>
+      <td style="text-align: left">Returns a character string that consists of <em>length</em> characters from <em>string</em> starting at the <em>offset</em> position</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn UCASE(string)}</td>
+      <td style="text-align: left">Returns a string in which all alphabetic characters in <em>string</em> have been converted to upper case</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="datetime">Date/time</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">{fn CURDATE()}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">CURRENT_DATE</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn CURTIME()}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">LOCALTIME</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn NOW()}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">LOCALTIMESTAMP</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn YEAR(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(YEAR FROM date)</code>. Returns an integer.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn QUARTER(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(QUARTER FROM date)</code>. Returns an integer between 1 and 4.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn MONTH(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(MONTH FROM date)</code>. Returns an integer between 1 and 12.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn WEEK(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(WEEK FROM date)</code>. Returns an integer between 1 and 53.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn DAYOFYEAR(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(DOY FROM date)</code>. Returns an integer between 1 and 366.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn DAYOFMONTH(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(DAY FROM date)</code>. Returns an integer between 1 and 31.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn DAYOFWEEK(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(DOW FROM date)</code>. Returns an integer between 1 and 7.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn HOUR(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(HOUR FROM date)</code>. Returns an integer between 0 and 23.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn MINUTE(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(MINUTE FROM date)</code>. Returns an integer between 0 and 59.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn SECOND(date)}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">EXTRACT(SECOND FROM date)</code>. Returns an integer between 0 and 59.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn TIMESTAMPADD(timeUnit, count, datetime)}</td>
+      <td style="text-align: left">Adds an interval of <em>count</em> <em>timeUnit</em>s to a datetime</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn TIMESTAMPDIFF(timeUnit, timestamp1, timestamp2)}</td>
+      <td style="text-align: left">Subtracts <em>timestamp1</em> from <em>timestamp2</em> and returns the result in <em>timeUnit</em>s</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="system">System</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">{fn DATABASE()}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">CURRENT_CATALOG</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn IFNULL(value1, value2)}</td>
+      <td style="text-align: left">Returns value2 if value1 is null</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">{fn USER()}</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">CURRENT_USER</code>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="conversion">Conversion</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">{fn CONVERT(value, type)}</td>
+      <td style="text-align: left">Cast <em>value</em> into <em>type</em>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="aggregate-functions">Aggregate functions</h3>
+
+<p>Syntax:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">aggregateCall</span><span class="p">:</span>
+      <span class="n">agg</span> <span class="s1">'('</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="n">value</span> <span class="p">[,</span> <span class="n">value</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="p">[</span> <span class="n">WITHIN</span> <span class="k">DISTINCT</span> <span class="s1">'('</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">WITHIN</span> <span class="k">GROUP</span> <span class="s1">'('</span> <span class="k">ORDER</span> <span class="k">BY</span> <span class="n">orderItem</span> <span class="p">[,</span> <span class="n">orderItem</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">FILTER</span> <span class="s1">'('</span> <span class="k">WHERE</span> <span class="n">condition</span> <span class="s1">')'</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="n">agg</span> <span class="s1">'('</span> <span class="s1">'*'</span> <span class="s1">')'</span> <span class="p">[</span> <span class="n">FILTER</span> <span class="p">(</span><span class="k">WHERE</span> <span class="n">condition</span><span class="p">)</span> <span class="p">]</span></code></pre></figure>
+
+<p>where <em>agg</em> is one of the operators in the following table, or a user-defined
+aggregate function.</p>
+
+<p>If <code class="language-plaintext highlighter-rouge">FILTER</code> is present, the aggregate function only considers rows for which
+<em>condition</em> evaluates to TRUE.</p>
+
+<p>If <code class="language-plaintext highlighter-rouge">DISTINCT</code> is present, duplicate argument values are eliminated before being
+passed to the aggregate function.</p>
+
+<p>If <code class="language-plaintext highlighter-rouge">WITHIN DISTINCT</code> is present, argument values are made distinct within
+each value of specified keys before being passed to the aggregate function.</p>
+
+<p>If <code class="language-plaintext highlighter-rouge">WITHIN GROUP</code> is present, the aggregate function sorts the input rows
+according to the <code class="language-plaintext highlighter-rouge">ORDER BY</code> clause inside <code class="language-plaintext highlighter-rouge">WITHIN GROUP</code> before aggregating
+values. <code class="language-plaintext highlighter-rouge">WITHIN GROUP</code> is only allowed for hypothetical set functions (<code class="language-plaintext highlighter-rouge">RANK</code>,
+<code class="language-plaintext highlighter-rouge">DENSE_RANK</code>, <code class="language-plaintext highlighter-rouge">PERCENT_RANK</code> and <code class="language-plaintext highlighter-rouge">CUME_DIST</code>), inverse distribution functions
+(<code class="language-plaintext highlighter-rouge">PERCENTILE_CONT</code> and <code class="language-plaintext highlighter-rouge">PERCENTILE_DISC</code>) and collection functions (<code class="language-plaintext highlighter-rouge">COLLECT</code>
+and <code class="language-plaintext highlighter-rouge">LISTAGG</code>).</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">ANY_VALUE( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns one of the values of <em>value</em> across all input values; this is NOT specified in the SQL standard</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">APPROX_COUNT_DISTINCT(value [, value ]*)</td>
+      <td style="text-align: left">Returns the approximate number of distinct values of <em>value</em>; the database is allowed to use an approximation but is not required to</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">AVG( [ ALL | DISTINCT ] numeric)</td>
+      <td style="text-align: left">Returns the average (arithmetic mean) of <em>numeric</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BIT_AND( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns the bitwise AND of all non-null input values, or null if none; integer and binary types are supported</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BIT_OR( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns the bitwise OR of all non-null input values, or null if none; integer and binary types are supported</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">BIT_XOR( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns the bitwise XOR of all non-null input values, or null if none; integer and binary types are supported</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COLLECT( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns a multiset of the values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COUNT(*)</td>
+      <td style="text-align: left">Returns the number of input rows</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COUNT( [ ALL | DISTINCT ] value [, value ]*)</td>
+      <td style="text-align: left">Returns the number of input rows for which <em>value</em> is not null (wholly not null if <em>value</em> is composite)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COVAR_POP(numeric1, numeric2)</td>
+      <td style="text-align: left">Returns the population covariance of the pair (<em>numeric1</em>, <em>numeric2</em>) across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COVAR_SAMP(numeric1, numeric2)</td>
+      <td style="text-align: left">Returns the sample covariance of the pair (<em>numeric1</em>, <em>numeric2</em>) across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">EVERY(condition)</td>
+      <td style="text-align: left">Returns TRUE if all of the values of <em>condition</em> are TRUE</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">FUSION(multiset)</td>
+      <td style="text-align: left">Returns the multiset union of <em>multiset</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">INTERSECTION(multiset)</td>
+      <td style="text-align: left">Returns the multiset intersection of <em>multiset</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LISTAGG( [ ALL | DISTINCT ] value [, separator])</td>
+      <td style="text-align: left">Returns values concatenated into a string, delimited by separator (default ‘,’)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MAX( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns the maximum value of <em>value</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MIN( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns the minimum value of <em>value</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MODE(value)</td>
+      <td style="text-align: left">Returns the most frequent value of <em>value</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">REGR_COUNT(numeric1, numeric2)</td>
+      <td style="text-align: left">Returns the number of rows where both dependent and independent expressions are not null</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">REGR_SXX(numeric1, numeric2)</td>
+      <td style="text-align: left">Returns the sum of squares of the dependent expression in a linear regression model</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">REGR_SYY(numeric1, numeric2)</td>
+      <td style="text-align: left">Returns the sum of squares of the independent expression in a linear regression model</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SOME(condition)</td>
+      <td style="text-align: left">Returns TRUE if one or more of the values of <em>condition</em> is TRUE</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">STDDEV( [ ALL | DISTINCT ] numeric)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">STDDEV_SAMP</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">STDDEV_POP( [ ALL | DISTINCT ] numeric)</td>
+      <td style="text-align: left">Returns the population standard deviation of <em>numeric</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">STDDEV_SAMP( [ ALL | DISTINCT ] numeric)</td>
+      <td style="text-align: left">Returns the sample standard deviation of <em>numeric</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SUM( [ ALL | DISTINCT ] numeric)</td>
+      <td style="text-align: left">Returns the sum of <em>numeric</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">VAR_POP( [ ALL | DISTINCT ] value)</td>
+      <td style="text-align: left">Returns the population variance (square of the population standard deviation) of <em>numeric</em> across all input values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">VAR_SAMP( [ ALL | DISTINCT ] numeric)</td>
+      <td style="text-align: left">Returns the sample variance (square of the sample standard deviation) of <em>numeric</em> across all input values</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>REGR_AVGX(numeric1, numeric2)</li>
+  <li>REGR_AVGY(numeric1, numeric2)</li>
+  <li>REGR_INTERCEPT(numeric1, numeric2)</li>
+  <li>REGR_R2(numeric1, numeric2)</li>
+  <li>REGR_SLOPE(numeric1, numeric2)</li>
+  <li>REGR_SXY(numeric1, numeric2)</li>
+</ul>
+
+<h4 id="ordered-set-aggregate-functions">Ordered-Set Aggregate Functions</h4>
+
+<p>The syntax is as for <em>aggregateCall</em>, except that <code class="language-plaintext highlighter-rouge">WITHIN GROUP</code> is
+required.</p>
+
+<p>In the following:</p>
+
+<ul>
+  <li>
+<em>fraction</em> is a numeric literal between 0 and 1, inclusive, and
+represents a percentage</li>
+</ul>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">PERCENTILE_CONT(fraction) WITHIN GROUP (ORDER BY orderItem)</td>
+      <td style="text-align: left">Returns a percentile based on a continuous distribution of the column values, interpolating between adjacent input items if needed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">PERCENTILE_DISC(fraction) WITHIN GROUP (ORDER BY orderItem [, orderItem ]*)</td>
+      <td style="text-align: left">Returns a percentile based on a discrete distribution of the column values returning the first input value whose position in the ordering equals or exceeds the specified fraction</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="window-functions">Window functions</h3>
+
+<p>Syntax:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">windowedAggregateCall</span><span class="p">:</span>
+      <span class="n">agg</span> <span class="s1">'('</span> <span class="p">[</span> <span class="k">ALL</span> <span class="o">|</span> <span class="k">DISTINCT</span> <span class="p">]</span> <span class="n">value</span> <span class="p">[,</span> <span class="n">value</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="p">[</span> <span class="n">RESPECT</span> <span class="n">NULLS</span> <span class="o">|</span> <span class="k">IGNORE</span> <span class="n">NULLS</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">WITHIN</span> <span class="k">GROUP</span> <span class="s1">'('</span> <span class="k">ORDER</span> <span class="k">BY</span> <span class="n">orderItem</span> <span class="p">[,</span> <span class="n">orderItem</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">FILTER</span> <span class="s1">'('</span> <span class="k">WHERE</span> <span class="n">condition</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="n">OVER</span> <span class="k">window</span>
+  <span class="o">|</span>   <span class="n">agg</span> <span class="s1">'('</span> <span class="s1">'*'</span> <span class="s1">')'</span>
+      <span class="p">[</span> <span class="n">FILTER</span>  <span class="s1">'('</span> <span class="k">WHERE</span> <span class="n">condition</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="n">OVER</span> <span class="k">window</span></code></pre></figure>
+
+<p>where <em>agg</em> is one of the operators in the following table, or a user-defined
+aggregate function.</p>
+
+<p><code class="language-plaintext highlighter-rouge">DISTINCT</code>, <code class="language-plaintext highlighter-rouge">FILTER</code> and <code class="language-plaintext highlighter-rouge">WITHIN GROUP</code> are as described for aggregate
+functions.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">COUNT(value [, value ]*) OVER window</td>
+      <td style="text-align: left">Returns the number of rows in <em>window</em> for which <em>value</em> is not null (wholly not null if <em>value</em> is composite)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">COUNT(*) OVER window</td>
+      <td style="text-align: left">Returns the number of rows in <em>window</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">AVG(numeric) OVER window</td>
+      <td style="text-align: left">Returns the average (arithmetic mean) of <em>numeric</em> across all values in <em>window</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SUM(numeric) OVER window</td>
+      <td style="text-align: left">Returns the sum of <em>numeric</em> across all values in <em>window</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MAX(value) OVER window</td>
+      <td style="text-align: left">Returns the maximum value of <em>value</em> across all values in <em>window</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">MIN(value) OVER window</td>
+      <td style="text-align: left">Returns the minimum value of <em>value</em> across all values in <em>window</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">RANK() OVER window</td>
+      <td style="text-align: left">Returns the rank of the current row with gaps; same as ROW_NUMBER of its first peer</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">DENSE_RANK() OVER window</td>
+      <td style="text-align: left">Returns the rank of the current row without gaps; this function counts peer groups</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">ROW_NUMBER() OVER window</td>
+      <td style="text-align: left">Returns the number of the current row within its partition, counting from 1</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">FIRST_VALUE(value) OVER window</td>
+      <td style="text-align: left">Returns <em>value</em> evaluated at the row that is the first row of the window frame</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LAST_VALUE(value) OVER window</td>
+      <td style="text-align: left">Returns <em>value</em> evaluated at the row that is the last row of the window frame</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LEAD(value, offset, default) OVER window</td>
+      <td style="text-align: left">Returns <em>value</em> evaluated at the row that is <em>offset</em> rows after the current row within the partition; if there is no such row, instead returns <em>default</em>. Both <em>offset</em> and <em>default</em> are evaluated with respect to the current row. If omitted, <em>offset</em> defaults to 1 and <em>default</em> to NULL</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">LAG(value, offset, default) OVER window</td>
+      <td style="text-align: left">Returns <em>value</em> evaluated at the row that is <em>offset</em> rows before the current row within the partition; if there is no such row, instead returns <em>default</em>. Both <em>offset</em> and <em>default</em> are evaluated with respect to the current row. If omitted, <em>offset</em> defaults to 1 and <em>default</em> to NULL</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">NTH_VALUE(value, nth) OVER window</td>
+      <td style="text-align: left">Returns <em>value</em> evaluated at the row that is the <em>n</em>th row of the window frame</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">NTILE(value) OVER window</td>
+      <td style="text-align: left">Returns an integer ranging from 1 to <em>value</em>, dividing the partition as equally as possible</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Note:</p>
+
+<ul>
+  <li>You may specify null treatment (<code class="language-plaintext highlighter-rouge">IGNORE NULLS</code>, <code class="language-plaintext highlighter-rouge">RESPECT NULLS</code>) for
+<code class="language-plaintext highlighter-rouge">FIRST_VALUE</code>, <code class="language-plaintext highlighter-rouge">LAST_VALUE</code>, <code class="language-plaintext highlighter-rouge">NTH_VALUE</code>, <code class="language-plaintext highlighter-rouge">LEAD</code> and <code class="language-plaintext highlighter-rouge">LAG</code> functions. The
+syntax handled by the parser, but only <code class="language-plaintext highlighter-rouge">RESPECT NULLS</code> is implemented at
+runtime.</li>
+</ul>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>COUNT(DISTINCT value [, value ]*) OVER window</li>
+  <li>APPROX_COUNT_DISTINCT(value [, value ]*) OVER window</li>
+  <li>PERCENT_RANK(value) OVER window</li>
+  <li>CUME_DIST(value) OVER window</li>
+</ul>
+
+<h3 id="grouping-functions">Grouping functions</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">GROUPING(expression [, expression ]*)</td>
+      <td style="text-align: left">Returns a bit vector of the given grouping expressions</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">GROUP_ID()</td>
+      <td style="text-align: left">Returns an integer that uniquely identifies the combination of grouping keys</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">GROUPING_ID(expression [, expression ]*)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">GROUPING</code>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="descriptor">DESCRIPTOR</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">DESCRIPTOR(name [, name ]*)</td>
+      <td style="text-align: left">DESCRIPTOR appears as an argument in a function to indicate a list of names. The interpretation of names is left to the function.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="table-functions">Table functions</h3>
+
+<p>Table functions occur in the <code class="language-plaintext highlighter-rouge">FROM</code> clause.</p>
+
+<p>Table functions may have generic table parameters (i.e., no row type is
+declared when the table function is created), and the row type of the result
+ might depend on the row type(s) of the input tables.
+Besides, input tables are classified by three characteristics.
+The first characteristic is semantics. Input tables have either row semantics
+or set semantics, as follows:</p>
+<ul>
+  <li>Row semantics means that the result of the table function depends on a
+row-by-row basis.</li>
+  <li>Set semantics means that the outcome of the function depends on how the
+data is partitioned.</li>
+</ul>
+
+<p>The second characteristic, which applies only to input tables with
+set semantics, is whether the table function can generate a result row
+even if the input table is empty.</p>
+<ul>
+  <li>If the table function can generate a result row on empty input,
+the table is said to be “keep when empty”.</li>
+  <li>The alternative is called “prune when empty”, meaning that
+the result would be pruned out if the input table is empty.</li>
+</ul>
+
+<p>The third characteristic is whether the input table supports
+pass-through columns or not. Pass-through columns is a mechanism
+enabling the table function to copy every column of an input row
+into columns of an output row.</p>
+
+<p>The input tables with set semantics may be partitioned on one or more columns.
+The input tables with set semantics may be ordered on one or more columns.</p>
+
+<p>Note:</p>
+<ul>
+  <li>The input tables with row semantics may not be partitioned or ordered.</li>
+  <li>A polymorphic table function may have multiple input tables. However,
+at most one input table could have row semantics.</li>
+</ul>
+
+<h4 id="tumble">TUMBLE</h4>
+
+<p>In streaming queries, TUMBLE assigns a window for each row of a relation based
+on a timestamp column. An assigned window is specified by its beginning and
+ending. All assigned windows have the same length, and that’s why tumbling
+sometimes is named as “fixed windowing”.
+The first parameter of the TUMBLE table function is a generic table parameter.
+The input table has row semantics and supports pass-through columns.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">TUMBLE(data, DESCRIPTOR(timecol), size [, offset ])</td>
+      <td style="text-align: left">Indicates a tumbling window of <em>size</em> interval for <em>timecol</em>, optionally aligned at <em>offset</em>.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Here is an example:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="k">TABLE</span><span class="p">(</span>
+  <span class="n">TUMBLE</span><span class="p">(</span>
+    <span class="k">TABLE</span> <span class="n">orders</span><span class="p">,</span>
+    <span class="k">DESCRIPTOR</span><span class="p">(</span><span class="n">rowtime</span><span class="p">),</span>
+    <span class="n">INTERVAL</span> <span class="s1">'1'</span> <span class="k">MINUTE</span><span class="p">));</span>
+
+<span class="c1">-- or with the named params</span>
+<span class="c1">-- note: the DATA param must be the first</span>
+<span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="k">TABLE</span><span class="p">(</span>
+  <span class="n">TUMBLE</span><span class="p">(</span>
+    <span class="k">DATA</span> <span class="o">=&gt;</span> <span class="k">TABLE</span> <span class="n">orders</span><span class="p">,</span>
+    <span class="n">TIMECOL</span> <span class="o">=&gt;</span> <span class="k">DESCRIPTOR</span><span class="p">(</span><span class="n">rowtime</span><span class="p">),</span>
+    <span class="k">SIZE</span> <span class="o">=&gt;</span> <span class="n">INTERVAL</span> <span class="s1">'1'</span> <span class="k">MINUTE</span><span class="p">));</span></code></pre></figure>
+
+<p>applies a tumbling window with a one minute range to rows from the <code class="language-plaintext highlighter-rouge">orders</code>
+table. <code class="language-plaintext highlighter-rouge">rowtime</code> is the watermarked column of the <code class="language-plaintext highlighter-rouge">orders</code> table that informs
+whether data is complete.</p>
+
+<h4 id="hop">HOP</h4>
+
+<p>In streaming queries, HOP assigns windows that cover rows within the interval of <em>size</em> and shifting every <em>slide</em> based
+on a timestamp column. Windows assigned could have overlapping so hopping sometime is named as “sliding windowing”.
+The first parameter of the HOP table function is a generic table parameter.
+The input table has row semantics and supports pass-through columns.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">HOP(data, DESCRIPTOR(timecol), slide, size [, offset ])</td>
+      <td style="text-align: left">Indicates a hopping window for <em>timecol</em>, covering rows within the interval of <em>size</em>, shifting every <em>slide</em> and optionally aligned at <em>offset</em>.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Here is an example:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="k">TABLE</span><span class="p">(</span>
+  <span class="n">HOP</span><span class="p">(</span>
+    <span class="k">TABLE</span> <span class="n">orders</span><span class="p">,</span>
+    <span class="k">DESCRIPTOR</span><span class="p">(</span><span class="n">rowtime</span><span class="p">),</span>
+    <span class="n">INTERVAL</span> <span class="s1">'2'</span> <span class="k">MINUTE</span><span class="p">,</span>
+    <span class="n">INTERVAL</span> <span class="s1">'5'</span> <span class="k">MINUTE</span><span class="p">));</span>
+
+<span class="c1">-- or with the named params</span>
+<span class="c1">-- note: the DATA param must be the first</span>
+<span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="k">TABLE</span><span class="p">(</span>
+  <span class="n">HOP</span><span class="p">(</span>
+    <span class="k">DATA</span> <span class="o">=&gt;</span> <span class="k">TABLE</span> <span class="n">orders</span><span class="p">,</span>
+    <span class="n">TIMECOL</span> <span class="o">=&gt;</span> <span class="k">DESCRIPTOR</span><span class="p">(</span><span class="n">rowtime</span><span class="p">),</span>
+    <span class="n">SLIDE</span> <span class="o">=&gt;</span> <span class="n">INTERVAL</span> <span class="s1">'2'</span> <span class="k">MINUTE</span><span class="p">,</span>
+    <span class="k">SIZE</span> <span class="o">=&gt;</span> <span class="n">INTERVAL</span> <span class="s1">'5'</span> <span class="k">MINUTE</span><span class="p">));</span></code></pre></figure>
+
+<p>applies hopping with 5-minute interval size on rows from table <code class="language-plaintext highlighter-rouge">orders</code>
+and shifting every 2 minutes. <code class="language-plaintext highlighter-rouge">rowtime</code> is the watermarked column of table
+orders that tells data completeness.</p>
+
+<h4 id="session">SESSION</h4>
+
+<p>In streaming queries, SESSION assigns windows that cover rows based on <em>datetime</em>. Within a session window, distances
+of rows are less than <em>interval</em>. Session window is applied per <em>key</em>.
+The first parameter of the SESSION table function is a generic table parameter.
+The input table has set semantics and supports pass-through columns.
+Besides, the SESSION table function would not generate a result row
+if the input table is empty.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">session(data, DESCRIPTOR(timecol), DESCRIPTOR(key), size)</td>
+      <td style="text-align: left">Indicates a session window of <em>size</em> interval for <em>timecol</em>. Session window is applied per <em>key</em>.</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Here is an example:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="k">TABLE</span><span class="p">(</span>
+  <span class="k">SESSION</span><span class="p">(</span>
+    <span class="k">TABLE</span> <span class="n">orders</span> <span class="k">PARTITION</span> <span class="k">BY</span> <span class="n">product</span><span class="p">,</span>
+    <span class="k">DESCRIPTOR</span><span class="p">(</span><span class="n">rowtime</span><span class="p">),</span>
+    <span class="n">INTERVAL</span> <span class="s1">'20'</span> <span class="k">MINUTE</span><span class="p">));</span>
+
+<span class="c1">-- or with the named params</span>
+<span class="c1">-- note: the DATA param must be the first</span>
+<span class="k">SELECT</span> <span class="o">*</span> <span class="k">FROM</span> <span class="k">TABLE</span><span class="p">(</span>
+  <span class="k">SESSION</span><span class="p">(</span>
+    <span class="k">DATA</span> <span class="o">=&gt;</span> <span class="k">TABLE</span> <span class="n">orders</span> <span class="k">PARTITION</span> <span class="k">BY</span> <span class="n">product</span><span class="p">,</span>
+    <span class="n">TIMECOL</span> <span class="o">=&gt;</span> <span class="k">DESCRIPTOR</span><span class="p">(</span><span class="n">rowtime</span><span class="p">),</span>
+    <span class="k">SIZE</span> <span class="o">=&gt;</span> <span class="n">INTERVAL</span> <span class="s1">'20'</span> <span class="k">MINUTE</span><span class="p">));</span></code></pre></figure>
+
+<p>applies a session with 20-minute inactive gap on rows from table <code class="language-plaintext highlighter-rouge">orders</code>.
+<code class="language-plaintext highlighter-rouge">rowtime</code> is the watermarked column of table orders that tells data
+completeness. Session is applied per product.</p>
+
+<p><strong>Note</strong>: The <code class="language-plaintext highlighter-rouge">Tumble</code>, <code class="language-plaintext highlighter-rouge">Hop</code> and <code class="language-plaintext highlighter-rouge">Session</code> window table functions assign
+each row in the original table to a window. The output table has all
+the same columns as the original table plus two additional columns <code class="language-plaintext highlighter-rouge">window_start</code>
+and <code class="language-plaintext highlighter-rouge">window_end</code>, which represent the start and end of the window interval, respectively.</p>
+
+<h3 id="grouped-window-functions">Grouped window functions</h3>
+<p><strong>warning</strong>: grouped window functions are deprecated.</p>
+
+<p>Grouped window functions occur in the <code class="language-plaintext highlighter-rouge">GROUP BY</code> clause and define a key value
+that represents a window containing several rows.</p>
+
+<p>In some window functions, a row may belong to more than one window.
+For example, if a query is grouped using
+<code class="language-plaintext highlighter-rouge">HOP(t, INTERVAL '2' HOUR, INTERVAL '1' HOUR)</code>, a row with timestamp ‘10:15:00’
+ will occur in both the 10:00 - 11:00 and 11:00 - 12:00 totals.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">HOP(datetime, slide, size [, time ])</td>
+      <td style="text-align: left">Indicates a hopping window for <em>datetime</em>, covering rows within the interval of <em>size</em>, shifting every <em>slide</em>, and optionally aligned at <em>time</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SESSION(datetime, interval [, time ])</td>
+      <td style="text-align: left">Indicates a session window of <em>interval</em> for <em>datetime</em>, optionally aligned at <em>time</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TUMBLE(datetime, interval [, time ])</td>
+      <td style="text-align: left">Indicates a tumbling window of <em>interval</em> for <em>datetime</em>, optionally aligned at <em>time</em>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="grouped-auxiliary-functions">Grouped auxiliary functions</h3>
+
+<p>Grouped auxiliary functions allow you to access properties of a window defined
+by a grouped window function.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">HOP_END(expression, slide, size [, time ])</td>
+      <td style="text-align: left">Returns the value of <em>expression</em> at the end of the window defined by a <code class="language-plaintext highlighter-rouge">HOP</code> function call</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">HOP_START(expression, slide, size [, time ])</td>
+      <td style="text-align: left">Returns the value of <em>expression</em> at the beginning of the window defined by a <code class="language-plaintext highlighter-rouge">HOP</code> function call</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SESSION_END(expression, interval [, time])</td>
+      <td style="text-align: left">Returns the value of <em>expression</em> at the end of the window defined by a <code class="language-plaintext highlighter-rouge">SESSION</code> function call</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">SESSION_START(expression, interval [, time])</td>
+      <td style="text-align: left">Returns the value of <em>expression</em> at the beginning of the window defined by a <code class="language-plaintext highlighter-rouge">SESSION</code> function call</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TUMBLE_END(expression, interval [, time ])</td>
+      <td style="text-align: left">Returns the value of <em>expression</em> at the end of the window defined by a <code class="language-plaintext highlighter-rouge">TUMBLE</code> function call</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">TUMBLE_START(expression, interval [, time ])</td>
+      <td style="text-align: left">Returns the value of <em>expression</em> at the beginning of the window defined by a <code class="language-plaintext highlighter-rouge">TUMBLE</code> function call</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="spatial-functions">Spatial functions</h3>
+
+<p>In the following:</p>
+
+<ul>
+  <li>
+<em>geom</em> is a GEOMETRY;</li>
+  <li>
+<em>geomCollection</em> is a GEOMETRYCOLLECTION;</li>
+  <li>
+<em>point</em> is a POINT;</li>
+  <li>
+<em>lineString</em> is a LINESTRING;</li>
+  <li>
+<em>iMatrix</em> is a <a href="https://en.wikipedia.org/wiki/DE-9IM">DE-9IM intersection matrix</a>;</li>
+  <li>
+<em>distance</em>, <em>tolerance</em>, <em>segmentLengthFraction</em>, <em>offsetDistance</em> are of type double;</li>
+  <li>
+<em>dimension</em>, <em>quadSegs</em>, <em>srid</em>, <em>zoom</em> are of type integer;</li>
+  <li>
+<em>layerType</em> is a character string;</li>
+  <li>
+<em>gml</em> is a character string containing <a href="https://en.wikipedia.org/wiki/Geography_Markup_Language">Geography Markup Language (GML)</a>;</li>
+  <li>
+<em>wkt</em> is a character string containing <a href="https://en.wikipedia.org/wiki/Well-known_text">well-known text (WKT)</a>;</li>
+  <li>
+<em>wkb</em> is a binary string containing <a href="https://en.wikipedia.org/wiki/Well-known_binary">well-known binary (WKB)</a>.</li>
+</ul>
+
+<p>In the “C” (for “compatibility”) column, “o” indicates that the function
+implements the OpenGIS Simple Features Implementation Specification for SQL,
+<a href="https://www.opengeospatial.org/standards/sfs">version 1.2.1</a>;
+“p” indicates that the function is a
+<a href="https://www.postgis.net/docs/reference.html">PostGIS</a> extension to OpenGIS;
+“h” indicates that the function is an
+<a href="http://www.h2gis.org/docs/dev/functions/">H2GIS</a> extension.</p>
+
+<h4 id="geometry-conversion-functions-2d">Geometry conversion functions (2D)</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_AsBinary(geom)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">ST_AsWKB</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_AsEWKB(geom)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">ST_AsWKB</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_AsEWKT(geom)</td>
+      <td style="text-align: left">Converts GEOMETRY → EWKT</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_AsGeoJSON(geom)</td>
+      <td style="text-align: left">Converts GEOMETRY → GeoJSON</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_AsGML(geom)</td>
+      <td style="text-align: left">Converts GEOMETRY → GML</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_AsText(geom)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">ST_AsWKT</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_AsWKB(geom)</td>
+      <td style="text-align: left">Converts GEOMETRY → WKB</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_AsWKT(geom)</td>
+      <td style="text-align: left">Converts GEOMETRY → WKT</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Force2D(geom)</td>
+      <td style="text-align: left">3D GEOMETRY → 2D GEOMETRY</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeomFromEWKB(wkb [, srid ])</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">ST_GeomFromWKB</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeomFromEWKT(wkb [, srid ])</td>
+      <td style="text-align: left">Converts EWKT → GEOMETRY</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeomFromGeoJSON(json)</td>
+      <td style="text-align: left">Converts GeoJSON → GEOMETRY</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeomFromGML(wkb [, srid ])</td>
+      <td style="text-align: left">Converts GML → GEOMETRY</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeomFromText(wkt [, srid ])</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">ST_GeomFromWKT</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeomFromWKB(wkb [, srid ])</td>
+      <td style="text-align: left">Converts WKB → GEOMETRY</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeomFromWKT(wkb [, srid ])</td>
+      <td style="text-align: left">Converts WKT → GEOMETRY</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_LineFromText(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKT → LINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_LineFromWKB(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKT → LINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_MLineFromText(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKT → MULTILINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_MPointFromText(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKT → MULTIPOINT</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_MPolyFromText(wkt [, srid ]) Converts WKT → MULTIPOLYGON</td>
+      <td style="text-align: left"> </td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_PointFromText(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKT → POINT</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_PointFromWKB(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKB → POINT</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_PolyFromText(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKT → POLYGON</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_PolyFromWKB(wkt [, srid ])</td>
+      <td style="text-align: left">Converts WKB → POLYGON</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_ToMultiPoint(geom)</td>
+      <td style="text-align: left">Converts the coordinates of <em>geom</em> (which may be a GEOMETRYCOLLECTION) into a MULTIPOINT</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_ToMultiLine(geom)</td>
+      <td style="text-align: left">Converts the coordinates of <em>geom</em> (which may be a GEOMETRYCOLLECTION) into a MULTILINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_ToMultiSegments(geom)</td>
+      <td style="text-align: left">Converts <em>geom</em> (which may be a GEOMETRYCOLLECTION) into a set of distinct segments stored in a MULTILINESTRING</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_GoogleMapLink(geom [, layerType [, zoom ]]) GEOMETRY → Google map link</li>
+  <li>ST_OSMMapLink(geom [, marker ]) GEOMETRY → OSM map link</li>
+</ul>
+
+<h4 id="geometry-conversion-functions-3d">Geometry conversion functions (3D)</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Force3D(geom)</td>
+      <td style="text-align: left">2D GEOMETRY → 3D GEOMETRY</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="geometry-creation-functions-2d">Geometry creation functions (2D)</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_BoundingCircle(geom)</td>
+      <td style="text-align: left">Returns the minimum bounding circle of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_Expand(geom, distance)</td>
+      <td style="text-align: left">Expands <em>geom</em>’s envelope</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_Expand(geom, deltaX, deltaY)</td>
+      <td style="text-align: left">Expands <em>geom</em>’s envelope</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_MakeEllipse(point, width, height)</td>
+      <td style="text-align: left">Constructs an ellipse</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_MakeEnvelope(xMin, yMin, xMax, yMax  [, srid ])</td>
+      <td style="text-align: left">Creates a rectangular POLYGON</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_MakeGrid(geom, deltaX, deltaY)</td>
+      <td style="text-align: left">Calculates a regular grid of POLYGONs based on <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_MakeGridPoints(geom, deltaX, deltaY)</td>
+      <td style="text-align: left">Calculates a regular grid of points based on <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_MakeLine(point1 [, point ]*)</td>
+      <td style="text-align: left">Creates a line-string from the given POINTs (or MULTIPOINTs)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_MakePoint(x, y [, z ])</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">ST_Point</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_MakePolygon(lineString [, hole ]*)</td>
+      <td style="text-align: left">Creates a POLYGON from <em>lineString</em> with the given holes (which are required to be closed LINESTRINGs)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_MinimumDiameter(geom)</td>
+      <td style="text-align: left">Returns the minimum diameter of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_MinimumRectangle(geom)</td>
+      <td style="text-align: left">Returns the minimum rectangle enclosing <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_OctogonalEnvelope(geom)</td>
+      <td style="text-align: left">Returns the octogonal envelope of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Point(x, y [, z ])</td>
+      <td style="text-align: left">Constructs a point from two or three coordinates</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_RingBuffer(geom, distance, bufferCount [, endCapStyle [, doDifference]]) Returns a MULTIPOLYGON of buffers centered at <em>geom</em> and of increasing buffer size</li>
+</ul>
+
+<h3 id="geometry-creation-functions-3d">Geometry creation functions (3D)</h3>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_Extrude(geom, height [, flag]) Extrudes a GEOMETRY</li>
+  <li>ST_GeometryShadow(geom, point, height) Computes the shadow footprint of <em>geom</em>
+</li>
+  <li>ST_GeometryShadow(geom, azimuth, altitude, height [, unify ]) Computes the shadow footprint of <em>geom</em>
+</li>
+</ul>
+
+<h4 id="geometry-properties-2d">Geometry properties (2D)</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Boundary(geom [, srid ])</td>
+      <td style="text-align: left">Returns the boundary of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Centroid(geom)</td>
+      <td style="text-align: left">Returns the centroid of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_CoordDim(geom)</td>
+      <td style="text-align: left">Returns the dimension of the coordinates of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Dimension(geom)</td>
+      <td style="text-align: left">Returns the dimension of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Distance(geom1, geom2)</td>
+      <td style="text-align: left">Returns the distance between <em>geom1</em> and <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_ExteriorRing(geom)</td>
+      <td style="text-align: left">Returns the exterior ring of <em>geom</em>, or null if <em>geom</em> is not a polygon</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeometryType(geom)</td>
+      <td style="text-align: left">Returns the type of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_GeometryTypeCode(geom)</td>
+      <td style="text-align: left">Returns the OGC SFS type code of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_EndPoint(lineString)</td>
+      <td style="text-align: left">Returns the last coordinate of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Envelope(geom [, srid ])</td>
+      <td style="text-align: left">Returns the envelope of <em>geom</em> (which may be a GEOMETRYCOLLECTION) as a GEOMETRY</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Extent(geom)</td>
+      <td style="text-align: left">Returns the minimum bounding box of <em>geom</em> (which may be a GEOMETRYCOLLECTION)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_GeometryN(geomCollection, n)</td>
+      <td style="text-align: left">Returns the <em>n</em>th GEOMETRY of <em>geomCollection</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_InteriorRingN(geom)</td>
+      <td style="text-align: left">Returns the nth interior ring of <em>geom</em>, or null if <em>geom</em> is not a polygon</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_IsClosed(geom)</td>
+      <td style="text-align: left">Returns whether <em>geom</em> is a closed LINESTRING or MULTILINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_IsEmpty(geom)</td>
+      <td style="text-align: left">Returns whether <em>geom</em> is empty</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_IsRectangle(geom)</td>
+      <td style="text-align: left">Returns whether <em>geom</em> is a rectangle</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_IsRing(geom)</td>
+      <td style="text-align: left">Returns whether <em>geom</em> is a closed and simple line-string or MULTILINESTRING</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_IsSimple(geom)</td>
+      <td style="text-align: left">Returns whether <em>geom</em> is simple</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_IsValid(geom)</td>
+      <td style="text-align: left">Returns whether <em>geom</em> is valid</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_NPoints(geom)</td>
+      <td style="text-align: left">Returns the number of points in <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_NumGeometries(geom)</td>
+      <td style="text-align: left">Returns the number of geometries in <em>geom</em> (1 if it is not a GEOMETRYCOLLECTION)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_NumInteriorRing(geom)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">ST_NumInteriorRings</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_NumInteriorRings(geom)</td>
+      <td style="text-align: left">Returns the number of interior rings of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h</td>
+      <td style="text-align: left">ST_NumPoints(geom)</td>
+      <td style="text-align: left">Returns the number of points in <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_PointN(geom, n)</td>
+      <td style="text-align: left">Returns the <em>n</em>th point of a <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_PointOnSurface(geom)</td>
+      <td style="text-align: left">Returns an interior or boundary point of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_SRID(geom)</td>
+      <td style="text-align: left">Returns SRID value of <em>geom</em> or 0 if it does not have one</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_StartPoint(geom)</td>
+      <td style="text-align: left">Returns the first point of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_X(geom)</td>
+      <td style="text-align: left">Returns the x-value of the first coordinate of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_XMax(geom)</td>
+      <td style="text-align: left">Returns the maximum x-value of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_XMin(geom)</td>
+      <td style="text-align: left">Returns the minimum x-value of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Y(geom)</td>
+      <td style="text-align: left">Returns the y-value of the first coordinate of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_YMax(geom)</td>
+      <td style="text-align: left">Returns the maximum y-value of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_YMin(geom)</td>
+      <td style="text-align: left">Returns the minimum y-value of <em>geom</em>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_CompactnessRatio(polygon) Returns the square root of <em>polygon</em>’s area divided by the area of the circle with circumference equal to its perimeter</li>
+  <li>ST_Explode(query [, fieldName]) Explodes the GEOMETRYCOLLECTIONs in the <em>fieldName</em> column of a query into multiple geometries</li>
+  <li>ST_IsValidDetail(geom [, selfTouchValid ]) Returns a valid detail as an array of objects</li>
+  <li>ST_IsValidReason(geom [, selfTouchValid ]) Returns text stating whether <em>geom</em> is valid, and if not valid, a reason why</li>
+</ul>
+
+<h4 id="geometry-properties-3d">Geometry properties (3D)</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_Is3D(s)</td>
+      <td style="text-align: left">Returns whether <em>geom</em> has at least one z-coordinate</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Z(geom)</td>
+      <td style="text-align: left">Returns the z-value of the first coordinate of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_ZMax(geom)</td>
+      <td style="text-align: left">Returns the maximum z-value of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_ZMin(geom)</td>
+      <td style="text-align: left">Returns the minimum z-value of <em>geom</em>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="geometry-predicates">Geometry predicates</h3>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Contains(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> contains <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_ContainsProperly(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> contains <em>geom2</em> but does not intersect its boundary</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_Covers(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether no point in <em>geom2</em> is outside <em>geom1</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Crosses(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> crosses <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Disjoint(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> and <em>geom2</em> are disjoint</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">ST_DWithin(geom1, geom2, distance)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> and <em>geom</em> are within <em>distance</em> of one another</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_EnvelopesIntersect(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether the envelope of <em>geom1</em> intersects the envelope of <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Equals(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> equals <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Intersects(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> intersects <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Overlaps(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> overlaps <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Relate(geom1, geom2)</td>
+      <td style="text-align: left">Returns the DE-9IM intersection matrix of <em>geom1</em> and <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Relate(geom1, geom2, iMatrix)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> and <em>geom2</em> are related by the given intersection matrix <em>iMatrix</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Touches(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> touches <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Within(geom1, geom2)</td>
+      <td style="text-align: left">Returns whether <em>geom1</em> is within <em>geom2</em>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_OrderingEquals(geom1, geom2) Returns whether <em>geom1</em> equals <em>geom2</em> and their coordinates and component Geometries are listed in the same order</li>
+</ul>
+
+<h4 id="geometry-operators-2d">Geometry operators (2D)</h4>
+
+<p>The following functions combine 2D geometries.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Buffer(geom, distance [, quadSegs | style ])</td>
+      <td style="text-align: left">Computes a buffer around <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_ConvexHull(geom)</td>
+      <td style="text-align: left">Computes the smallest convex polygon that contains all the points in <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Difference(geom1, geom2)</td>
+      <td style="text-align: left">Computes the difference between two geometries</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_SymDifference(geom1, geom2)</td>
+      <td style="text-align: left">Computes the symmetric difference between two geometries</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Intersection(geom1, geom2)</td>
+      <td style="text-align: left">Computes the intersection of <em>geom1</em> and <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Union(geom1, geom2)</td>
+      <td style="text-align: left">Computes the union of <em>geom1</em> and <em>geom2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Union(geomCollection)</td>
+      <td style="text-align: left">Computes the union of the geometries in <em>geomCollection</em>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>See also: the <code class="language-plaintext highlighter-rouge">ST_Union</code> aggregate function.</p>
+
+<h4 id="affine-transformation-functions-3d-and-2d">Affine transformation functions (3D and 2D)</h4>
+
+<p>The following functions transform 2D geometries.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Rotate(geom, angle [, origin | x, y])</td>
+      <td style="text-align: left">Rotates a <em>geom</em> counter-clockwise by <em>angle</em> (in radians) about <em>origin</em> (or the point (<em>x</em>, <em>y</em>))</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Scale(geom, xFactor, yFactor)</td>
+      <td style="text-align: left">Scales <em>geom</em> by multiplying the ordinates by the indicated scale factors</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Translate(geom, x, y)</td>
+      <td style="text-align: left">Translates <em>geom</em> by the vector (x, y)</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_Scale(geom, xFactor, yFactor [, zFactor ]) Scales <em>geom</em> by multiplying the ordinates by the indicated scale factors</li>
+  <li>ST_Translate(geom, x, y, [, z]) Translates <em>geom</em>
+</li>
+</ul>
+
+<h4 id="geometry-editing-functions-2d">Geometry editing functions (2D)</h4>
+
+<p>The following functions modify 2D geometries.</p>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_AddPoint(geom, point [, tolerance ]) Adds <em>point</em> to <em>geom</em> with a given <em>tolerance</em> (default 0)</li>
+  <li>ST_CollectionExtract(geom, dimension) Filters <em>geom</em>, returning a multi-geometry of those members with a given <em>dimension</em> (1 = point, 2 = line-string, 3 = polygon)</li>
+  <li>ST_Densify(geom, tolerance) Inserts extra vertices every <em>tolerance</em> along the line segments of <em>geom</em>
+</li>
+  <li>ST_FlipCoordinates(geom) Flips the X and Y coordinates of <em>geom</em>
+</li>
+  <li>ST_Holes(geom) Returns the holes in <em>geom</em> (which may be a GEOMETRYCOLLECTION)</li>
+  <li>ST_Normalize(geom) Converts <em>geom</em> to normal form</li>
+  <li>ST_RemoveDuplicatedCoordinates(geom) Removes duplicated coordinates from <em>geom</em>
+</li>
+  <li>ST_RemoveHoles(geom) Removes a <em>geom</em>’s holes</li>
+  <li>ST_RemovePoints(geom, poly) Removes all coordinates of <em>geom</em> located within <em>poly</em>; null if all coordinates are removed</li>
+  <li>ST_RemoveRepeatedPoints(geom, tolerance) Removes from <em>geom</em> all repeated points (or points within <em>tolerance</em> of another point)</li>
+  <li>ST_Reverse(geom) Reverses the vertex order of <em>geom</em>
+</li>
+</ul>
+
+<h4 id="geometry-editing-functions-3d">Geometry editing functions (3D)</h4>
+
+<p>The following functions modify 3D geometries.</p>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_AddZ(geom, zToAdd) Adds <em>zToAdd</em> to the z-coordinate of <em>geom</em>
+</li>
+  <li>ST_Interpolate3DLine(geom) Returns <em>geom</em> with an interpolation of z values, or null if it is not a line-string or MULTILINESTRING</li>
+  <li>ST_MultiplyZ(geom, zFactor) Returns <em>geom</em> with its z-values multiplied by <em>zFactor</em>
+</li>
+  <li>ST_Reverse3DLine(geom [, sortOrder ]) Potentially reverses <em>geom</em> according to the z-values of its first and last coordinates</li>
+  <li>ST_UpdateZ(geom, newZ [, updateCondition ]) Updates the z-values of <em>geom</em>
+</li>
+  <li>ST_ZUpdateLineExtremities(geom, startZ, endZ [, interpolate ]) Updates the start and end z-values of <em>geom</em>
+</li>
+</ul>
+
+<h4 id="geometry-measurement-functions-2d">Geometry measurement functions (2D)</h4>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_Area(geom) Returns the area of <em>geom</em> (which may be a GEOMETRYCOLLECTION)</li>
+  <li>ST_ClosestCoordinate(geom, point) Returns the coordinate(s) of <em>geom</em> closest to <em>point</em>
+</li>
+  <li>ST_ClosestPoint(geom1, geom2) Returns the point of <em>geom1</em> closest to <em>geom2</em>
+</li>
+  <li>ST_FurthestCoordinate(geom, point) Returns the coordinate(s) of <em>geom</em> that are furthest from <em>point</em>
+</li>
+  <li>ST_Length(lineString) Returns the length of <em>lineString</em>
+</li>
+  <li>ST_LocateAlong(geom, segmentLengthFraction, offsetDistance) Returns a MULTIPOINT containing points along the line segments of <em>geom</em> at <em>segmentLengthFraction</em> and <em>offsetDistance</em>
+</li>
+  <li>ST_LongestLine(geom1, geom2) Returns the 2-dimensional longest line-string between the points of <em>geom1</em> and <em>geom2</em>
+</li>
+  <li>ST_MaxDistance(geom1, geom2) Computes the maximum distance between <em>geom1</em> and <em>geom2</em>
+</li>
+  <li>ST_Perimeter(polygon) Returns the length of the perimeter of <em>polygon</em> (which may be a MULTIPOLYGON)</li>
+  <li>ST_ProjectPoint(point, lineString) Projects <em>point</em> onto a <em>lineString</em> (which may be a MULTILINESTRING)</li>
+</ul>
+
+<h4 id="geometry-measurement-functions-3d">Geometry measurement functions (3D)</h4>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_3DArea(geom) Return a polygon’s 3D area</li>
+  <li>ST_3DLength(geom) Returns the 3D length of a line-string</li>
+  <li>ST_3DPerimeter(geom) Returns the 3D perimeter of a polygon or MULTIPOLYGON</li>
+  <li>ST_SunPosition(point [, timestamp ]) Computes the sun position at <em>point</em> and <em>timestamp</em> (now by default)</li>
+</ul>
+
+<h4 id="geometry-processing-functions-2d">Geometry processing functions (2D)</h4>
+
+<p>The following functions process geometries.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_LineMerge(geom)</td>
+      <td style="text-align: left">Merges a collection of linear components to form a line-string of maximal length</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_MakeValid(geom)</td>
+      <td style="text-align: left">Makes a valid geometry of a given invalid geometry</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Polygonize(geom)</td>
+      <td style="text-align: left">Creates a MULTIPOLYGON from edges of <em>geom</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_PrecisionReducer(geom, n)</td>
+      <td style="text-align: left">Reduces <em>geom</em>’s precision to <em>n</em> decimal places</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Simplify(geom, distance)</td>
+      <td style="text-align: left">Simplifies <em>geom</em> using the <a href="https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm">Douglas-Peuker algorithm</a> with a <em>distance</em> tolerance</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_SimplifyPreserveTopology(geom, distance)</td>
+      <td style="text-align: left">Simplifies <em>geom</em>, preserving its topology</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Snap(geom1, geom2, tolerance)</td>
+      <td style="text-align: left">Snaps <em>geom1</em> and <em>geom2</em> together</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_LineIntersector(geom1, geom2) Splits <em>geom1</em> (a line-string) with <em>geom2</em>
+</li>
+  <li>ST_LineMerge(geom) Merges a collection of linear components to form a line-string of maximal length</li>
+  <li>ST_MakeValid(geom [, preserveGeomDim [, preserveDuplicateCoord [, preserveCoordDim]]]) Makes <em>geom</em> valid</li>
+  <li>ST_RingSideBuffer(geom, distance, bufferCount [, endCapStyle [, doDifference]]) Computes a ring buffer on one side</li>
+  <li>ST_SideBuffer(geom, distance [, bufferStyle ]) Compute a single buffer on one side</li>
+  <li>ST_Split(geom1, geom2 [, tolerance]) Splits <em>geom1</em> by <em>geom2</em> using <em>tolerance</em> (default 1E-6) to determine where the point splits the line</li>
+</ul>
+
+<h4 id="geometry-projection-functions">Geometry projection functions</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_SetSRID(geom, srid)</td>
+      <td style="text-align: left">Returns a copy of <em>geom</em> with a new SRID</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">ST_Transform(geom, srid)</td>
+      <td style="text-align: left">Transforms <em>geom</em> from one coordinate reference system (CRS) to the CRS specified by <em>srid</em>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="trigonometry-functions">Trigonometry functions</h4>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_Azimuth(point1, point2) Return the azimuth of the segment from <em>point1</em> to <em>point2</em>
+</li>
+</ul>
+
+<h4 id="topography-functions">Topography functions</h4>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_TriangleAspect(geom) Returns the aspect of a triangle</li>
+  <li>ST_TriangleContouring(query [, z1, z2, z3 ][, varArgs]*) Splits triangles into smaller triangles according to classes</li>
+  <li>ST_TriangleDirection(geom) Computes the direction of steepest ascent of a triangle and returns it as a line-string</li>
+  <li>ST_TriangleSlope(geom) Computes the slope of a triangle as a percentage</li>
+  <li>ST_Voronoi(geom [, outDimension [, envelopePolygon ]]) Creates a Voronoi diagram</li>
+</ul>
+
+<h4 id="triangulation-functions">Triangulation functions</h4>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_ConstrainedDelaunay(geom [, flag [, quality ]]) Computes a constrained Delaunay triangulation based on <em>geom</em>
+</li>
+  <li>ST_Delaunay(geom [, flag [, quality ]]) Computes a Delaunay triangulation based on points</li>
+  <li>ST_Tessellate(polygon) Tessellates <em>polygon</em> (may be MULTIPOLYGON) with adaptive triangles</li>
+</ul>
+
+<h4 id="geometry-aggregate-functions">Geometry aggregate functions</h4>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>ST_Accum(geom) Accumulates <em>geom</em> into a GEOMETRYCOLLECTION (or MULTIPOINT, MULTILINESTRING or MULTIPOLYGON if possible)</li>
+  <li>ST_Collect(geom) Synonym for <code class="language-plaintext highlighter-rouge">ST_Accum</code>
+</li>
+  <li>ST_Union(geom) Computes the union of geometries</li>
+</ul>
+
+<h3 id="json-functions">JSON Functions</h3>
+
+<p>In the following:</p>
+
+<ul>
+  <li>
+<em>jsonValue</em> is a character string containing a JSON value;</li>
+  <li>
+<em>path</em> is a character string containing a JSON path expression; mode flag <code class="language-plaintext highlighter-rouge">strict</code> or <code class="language-plaintext highlighter-rouge">lax</code> should be specified in the beginning of <em>path</em>.</li>
+</ul>
+
+<h4 id="query-functions">Query Functions</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">JSON_EXISTS(jsonValue, path [ { TRUE | FALSE | UNKNOWN | ERROR } ON ERROR ] )</td>
+      <td style="text-align: left">Whether a <em>jsonValue</em> satisfies a search criterion described using JSON path expression <em>path</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON_VALUE(jsonValue, path [ RETURNING type ] [ { ERROR | NULL | DEFAULT expr } ON EMPTY ] [ { ERROR | NULL | DEFAULT expr } ON ERROR ] )</td>
+      <td style="text-align: left">Extract an SQL scalar from a <em>jsonValue</em> using JSON path expression <em>path</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON_QUERY(jsonValue, path [ { WITHOUT [ ARRAY ] | WITH [ CONDITIONAL | UNCONDITIONAL ] [ ARRAY ] } WRAPPER ] [ { ERROR | NULL | EMPTY ARRAY | EMPTY OBJECT } ON EMPTY ] [ { ERROR | NULL | EMPTY ARRAY | EMPTY OBJECT } ON ERROR ] )</td>
+      <td style="text-align: left">Extract a JSON object or JSON array from <em>jsonValue</em> using the <em>path</em> JSON path expression</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Note:</p>
+
+<ul>
+  <li>The <code class="language-plaintext highlighter-rouge">ON ERROR</code> and <code class="language-plaintext highlighter-rouge">ON EMPTY</code> clauses define the fallback
+behavior of the function when an error is thrown or a null value
+is about to be returned.</li>
+  <li>The <code class="language-plaintext highlighter-rouge">ARRAY WRAPPER</code> clause defines how to represent a JSON array result
+in <code class="language-plaintext highlighter-rouge">JSON_QUERY</code> function. The following examples compare the wrapper
+behaviors.</li>
+</ul>
+
+<p>Example Data:</p>
+
+<figure class="highlight"><pre><code class="language-json" data-lang="json"><span class="p">{</span><span class="nl">"a"</span><span class="p">:</span><span class="w"> </span><span class="s2">"[1,2]"</span><span class="p">,</span><span class="w"> </span><span class="nl">"b"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span><span class="w"> </span><span class="nl" [...]
+
+<p>Comparison:</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator</th>
+      <th style="text-align: left">$.a</th>
+      <th style="text-align: left">$.b</th>
+      <th style="text-align: left">$.c</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">JSON_VALUE</td>
+      <td style="text-align: left">[1, 2]</td>
+      <td style="text-align: left">error</td>
+      <td style="text-align: left">hi</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON QUERY WITHOUT ARRAY WRAPPER</td>
+      <td style="text-align: left">error</td>
+      <td style="text-align: left">[1, 2]</td>
+      <td style="text-align: left">error</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON QUERY WITH UNCONDITIONAL ARRAY WRAPPER</td>
+      <td style="text-align: left">[ “[1,2]” ]</td>
+      <td style="text-align: left">[ [1,2] ]</td>
+      <td style="text-align: left">[ “hi” ]</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON QUERY WITH CONDITIONAL ARRAY WRAPPER</td>
+      <td style="text-align: left">[ “[1,2]” ]</td>
+      <td style="text-align: left">[1,2]</td>
+      <td style="text-align: left">[ “hi” ]</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>JSON_TABLE</li>
+</ul>
+
+<h4 id="constructor-functions">Constructor Functions</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">JSON_OBJECT( jsonKeyVal [, jsonKeyVal ]* [ nullBehavior ] )</td>
+      <td style="text-align: left">Construct JSON object using a series of key-value pairs</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON_OBJECTAGG( jsonKeyVal [ nullBehavior ] )</td>
+      <td style="text-align: left">Aggregate function to construct a JSON object using a key-value pair</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON_ARRAY( [ jsonVal [, jsonVal ]* ] [ nullBehavior ] )</td>
+      <td style="text-align: left">Construct a JSON array using a series of values</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">JSON_ARRAYAGG( jsonVal [ ORDER BY orderItem [, orderItem ]* ] [ nullBehavior ] )</td>
+      <td style="text-align: left">Aggregate function to construct a JSON array using a value</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">jsonKeyVal</span><span class="p">:</span>
+      <span class="p">[</span> <span class="k">KEY</span> <span class="p">]</span> <span class="n">name</span> <span class="n">VALUE</span> <span class="n">value</span> <span class="p">[</span> <span class="n">FORMAT</span> <span class="n">JSON</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="n">name</span> <span class="p">:</span> <span class="n">value</span> <span class="p">[</span> <span class="n">FORMAT</span> <span class="n">JSON</span> <span class="p">]</span>
+
+<span class="n">jsonVal</span><span class="p">:</span>
+      <span class="n">value</span> <span class="p">[</span> <span class="n">FORMAT</span> <span class="n">JSON</span> <span class="p">]</span>
+
+<span class="n">nullBehavior</span><span class="p">:</span>
+      <span class="k">NULL</span> <span class="k">ON</span> <span class="k">NULL</span>
+  <span class="o">|</span>   <span class="n">ABSENT</span> <span class="k">ON</span> <span class="k">NULL</span></code></pre></figure>
+
+<p>Note:</p>
+
+<ul>
+  <li>The flag <code class="language-plaintext highlighter-rouge">FORMAT JSON</code> indicates the value is formatted as JSON
+character string. When <code class="language-plaintext highlighter-rouge">FORMAT JSON</code> is used, the value should be
+de-parse from JSON character string to a SQL structured value.</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">ON NULL</code> clause defines how the JSON output represents null
+values. The default null behavior of <code class="language-plaintext highlighter-rouge">JSON_OBJECT</code> and
+<code class="language-plaintext highlighter-rouge">JSON_OBJECTAGG</code> is <code class="language-plaintext highlighter-rouge">NULL ON NULL</code>, and for <code class="language-plaintext highlighter-rouge">JSON_ARRAY</code> and
+<code class="language-plaintext highlighter-rouge">JSON_ARRAYAGG</code> it is <code class="language-plaintext highlighter-rouge">ABSENT ON NULL</code>.</li>
+  <li>If <code class="language-plaintext highlighter-rouge">ORDER BY</code> clause is provided, <code class="language-plaintext highlighter-rouge">JSON_ARRAYAGG</code> sorts the
+input rows into the specified order before performing aggregation.</li>
+</ul>
+
+<h4 id="comparison-operators-1">Comparison Operators</h4>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">jsonValue IS JSON [ VALUE ]</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is a JSON value</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">jsonValue IS NOT JSON [ VALUE ]</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is not a JSON value</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">jsonValue IS JSON SCALAR</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is a JSON scalar value</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">jsonValue IS NOT JSON SCALAR</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is not a JSON scalar value</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">jsonValue IS JSON OBJECT</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is a JSON object</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">jsonValue IS NOT JSON OBJECT</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is not a JSON object</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">jsonValue IS JSON ARRAY</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is a JSON array</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">jsonValue IS NOT JSON ARRAY</td>
+      <td style="text-align: left">Whether <em>jsonValue</em> is not a JSON array</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h3 id="dialect-specific-operators">Dialect-specific Operators</h3>
+
+<p>The following operators are not in the SQL standard, and are not enabled in
+Calcite’s default operator table. They are only available for use in queries
+if your session has enabled an extra operator table.</p>
+
+<p>To enable an operator table, set the
+<a href="/docs/adapter.html#jdbc-connect-string-parameters">fun</a>
+connect string parameter.</p>
+
+<p>The ‘C’ (compatibility) column contains value:</p>
+<ul>
+  <li>‘b’ for Google BigQuery (‘fun=bigquery’ in the connect string),</li>
+  <li>‘h’ for Apache Hive (‘fun=hive’ in the connect string),</li>
+  <li>‘m’ for MySQL (‘fun=mysql’ in the connect string),</li>
+  <li>‘o’ for Oracle (‘fun=oracle’ in the connect string),</li>
+  <li>‘p’ for PostgreSQL (‘fun=postgresql’ in the connect string),</li>
+  <li>’s’ for Apache Spark (‘fun=spark’ in the connect string).</li>
+</ul>
+
+<p>One operator name may correspond to multiple SQL dialects, but with different
+semantics.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">expr :: type</td>
+      <td style="text-align: left">Casts <em>expr</em> to <em>type</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">expr1 &lt;=&gt; expr2</td>
+      <td style="text-align: left">Whether two values are equal, treating null values as the same, and it’s similar to <code class="language-plaintext highlighter-rouge">IS NOT DISTINCT FROM</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">ARRAY_CONCAT(array [, array ]*)</td>
+      <td style="text-align: left">Concatenates one or more arrays. If any input argument is <code class="language-plaintext highlighter-rouge">NULL</code> the function returns <code class="language-plaintext highlighter-rouge">NULL</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">ARRAY_LENGTH(array)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">CARDINALITY</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">ARRAY_REVERSE(array)</td>
+      <td style="text-align: left">Reverses elements of <em>array</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m s</td>
+      <td style="text-align: left">CHAR(integer)</td>
+      <td style="text-align: left">Returns the character whose ASCII code is <em>integer</em> % 256, or null if <em>integer</em> &lt; 0</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o p</td>
+      <td style="text-align: left">CHR(integer)</td>
+      <td style="text-align: left">Returns the character whose UTF-8 code is <em>integer</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">COSH(numeric)</td>
+      <td style="text-align: left">Returns the hyperbolic cosine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">CONCAT(string, string)</td>
+      <td style="text-align: left">Concatenates two strings</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m p</td>
+      <td style="text-align: left">CONCAT(string [, string ]*)</td>
+      <td style="text-align: left">Concatenates two or more strings</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">COMPRESS(string)</td>
+      <td style="text-align: left">Compresses a string using zlib compression and returns the result as a binary string.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">CONVERT_TIMEZONE(tz1, tz2, datetime)</td>
+      <td style="text-align: left">Converts the timezone of <em>datetime</em> from <em>tz1</em> to <em>tz2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">CURRENT_DATETIME([timezone])</td>
+      <td style="text-align: left">Returns the current time as a TIMESTAMP from <em>timezone</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">DAYNAME(datetime)</td>
+      <td style="text-align: left">Returns the name, in the connection’s locale, of the weekday in <em>datetime</em>; for example, it returns ‘星期日’ for both DATE ‘2020-02-10’ and TIMESTAMP ‘2020-02-10 10:10:10’</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">DATE(string)</td>
+      <td style="text-align: left">Equivalent to <code class="language-plaintext highlighter-rouge">CAST(string AS DATE)</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">DATE_FROM_UNIX_DATE(integer)</td>
+      <td style="text-align: left">Returns the DATE that is <em>integer</em> days after 1970-01-01</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">DECODE(value, value1, result1 [, valueN, resultN ]* [, default ])</td>
+      <td style="text-align: left">Compares <em>value</em> to each <em>valueN</em> value one by one; if <em>value</em> is equal to a <em>valueN</em>, returns the corresponding <em>resultN</em>, else returns <em>default</em>, or NULL if <em>default</em> is not specified</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">DIFFERENCE(string, string)</td>
+      <td style="text-align: left">Returns a measure of the similarity of two strings, namely the number of character positions that their <code class="language-plaintext highlighter-rouge">SOUNDEX</code> values have in common: 4 if the <code class="language-plaintext highlighter-rouge">SOUNDEX</code> values are same and 0 if the <code class="language-plaintext highlighter-rouge">SOUNDEX</code> values are totally different</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">EXTRACT(xml, xpath, [, namespaces ])</td>
+      <td style="text-align: left">Returns the xml fragment of the element or elements matched by the XPath expression. The optional namespace value that specifies a default mapping or namespace mapping for prefixes, which is used when evaluating the XPath expression</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">EXISTSNODE(xml, xpath, [, namespaces ])</td>
+      <td style="text-align: left">Determines whether traversal of a XML document using a specified xpath results in any nodes. Returns 0 if no nodes remain after applying the XPath traversal on the document fragment of the element or elements matched by the XPath expression. Returns 1 if any nodes remain. The optional namespace value that specifies a default mapping or namespace mapping for prefixes, which is used when evaluating the XPath expression.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">EXTRACTVALUE(xml, xpathExpr))</td>
+      <td style="text-align: left">Returns the text of the first text node which is a child of the element or elements matched by the XPath expression.</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">GREATEST(expr [, expr ]*)</td>
+      <td style="text-align: left">Returns the greatest of the expressions</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b h s</td>
+      <td style="text-align: left">IF(condition, value1, value2)</td>
+      <td style="text-align: left">Returns <em>value1</em> if <em>condition</em> is TRUE, <em>value2</em> otherwise</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">string1 ILIKE string2 [ ESCAPE string3 ]</td>
+      <td style="text-align: left">Whether <em>string1</em> matches pattern <em>string2</em>, ignoring case (similar to <code class="language-plaintext highlighter-rouge">LIKE</code>)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">string1 NOT ILIKE string2 [ ESCAPE string3 ]</td>
+      <td style="text-align: left">Whether <em>string1</em> does not match pattern <em>string2</em>, ignoring case (similar to <code class="language-plaintext highlighter-rouge">NOT LIKE</code>)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">JSON_TYPE(jsonValue)</td>
+      <td style="text-align: left">Returns a string value indicating the type of <em>jsonValue</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">JSON_DEPTH(jsonValue)</td>
+      <td style="text-align: left">Returns an integer value indicating the depth of <em>jsonValue</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">JSON_PRETTY(jsonValue)</td>
+      <td style="text-align: left">Returns a pretty-printing of <em>jsonValue</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">JSON_LENGTH(jsonValue [, path ])</td>
+      <td style="text-align: left">Returns a integer indicating the length of <em>jsonValue</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">JSON_KEYS(jsonValue [, path ])</td>
+      <td style="text-align: left">Returns a string indicating the keys of a JSON <em>jsonValue</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">JSON_REMOVE(jsonValue, path[, path])</td>
+      <td style="text-align: left">Removes data from <em>jsonValue</em> using a series of <em>path</em> expressions and returns the result</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">JSON_STORAGE_SIZE(jsonValue)</td>
+      <td style="text-align: left">Returns the number of bytes used to store the binary representation of <em>jsonValue</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">LEAST(expr [, expr ]* )</td>
+      <td style="text-align: left">Returns the least of the expressions</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m p</td>
+      <td style="text-align: left">LEFT(string, length)</td>
+      <td style="text-align: left">Returns the leftmost <em>length</em> characters from the <em>string</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">TO_BASE64(string)</td>
+      <td style="text-align: left">Converts the <em>string</em> to base-64 encoded form and returns a encoded string</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">FROM_BASE64(string)</td>
+      <td style="text-align: left">Returns the decoded result of a base-64 <em>string</em> as a string</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">LTRIM(string)</td>
+      <td style="text-align: left">Returns <em>string</em> with all blanks removed from the start</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m p</td>
+      <td style="text-align: left">MD5(string)</td>
+      <td style="text-align: left">Calculates an MD5 128-bit checksum of <em>string</em> and returns it as a hex string</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">MONTHNAME(date)</td>
+      <td style="text-align: left">Returns the name, in the connection’s locale, of the month in <em>datetime</em>; for example, it returns ‘二月’ for both DATE ‘2020-02-10’ and TIMESTAMP ‘2020-02-10 10:10:10’</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">NVL(value1, value2)</td>
+      <td style="text-align: left">Returns <em>value1</em> if <em>value1</em> is not null, otherwise <em>value2</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m o</td>
+      <td style="text-align: left">REGEXP_REPLACE(string, regexp, rep, [, pos [, occurrence [, matchType]]])</td>
+      <td style="text-align: left">Replaces all substrings of <em>string</em> that match <em>regexp</em> with <em>rep</em> at the starting <em>pos</em> in expr (if omitted, the default is 1), <em>occurrence</em> means which occurrence of a match to search for (if omitted, the default is 1), <em>matchType</em> specifies how to perform matching</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m p</td>
+      <td style="text-align: left">REPEAT(string, integer)</td>
+      <td style="text-align: left">Returns a string consisting of <em>string</em> repeated of <em>integer</em> times; returns an empty string if <em>integer</em> is less than 1</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">REVERSE(string)</td>
+      <td style="text-align: left">Returns <em>string</em> with the order of the characters reversed</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m p</td>
+      <td style="text-align: left">RIGHT(string, length)</td>
+      <td style="text-align: left">Returns the rightmost <em>length</em> characters from the <em>string</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h s</td>
+      <td style="text-align: left">string1 RLIKE string2</td>
+      <td style="text-align: left">Whether <em>string1</em> matches regex pattern <em>string2</em> (similar to <code class="language-plaintext highlighter-rouge">LIKE</code>, but uses Java regex)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">h s</td>
+      <td style="text-align: left">string1 NOT RLIKE string2</td>
+      <td style="text-align: left">Whether <em>string1</em> does not match regex pattern <em>string2</em> (similar to <code class="language-plaintext highlighter-rouge">NOT LIKE</code>, but uses Java regex)</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">RTRIM(string)</td>
+      <td style="text-align: left">Returns <em>string</em> with all blanks removed from the end</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m p</td>
+      <td style="text-align: left">SHA1(string)</td>
+      <td style="text-align: left">Calculates a SHA-1 hash value of <em>string</em> and returns it as a hex string</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">SINH(numeric)</td>
+      <td style="text-align: left">Returns the hyperbolic sine of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m o p</td>
+      <td style="text-align: left">SOUNDEX(string)</td>
+      <td style="text-align: left">Returns the phonetic representation of <em>string</em>; throws if <em>string</em> is encoded with multi-byte encoding such as UTF-8</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">SPACE(integer)</td>
+      <td style="text-align: left">Returns a string of <em>integer</em> spaces; returns an empty string if <em>integer</em> is less than 1</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b m o p</td>
+      <td style="text-align: left">SUBSTR(string, position [, substringLength ])</td>
+      <td style="text-align: left">Returns a portion of <em>string</em>, beginning at character <em>position</em>, <em>substringLength</em> characters long. SUBSTR calculates lengths using characters as defined by the input character set</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">STRCMP(string, string)</td>
+      <td style="text-align: left">Returns 0 if both of the strings are same and returns -1 when the first argument is smaller than the second and 1 when the second one is smaller than the first one</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">TANH(numeric)</td>
+      <td style="text-align: left">Returns the hyperbolic tangent of <em>numeric</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">TIMESTAMP_MICROS(integer)</td>
+      <td style="text-align: left">Returns the TIMESTAMP that is <em>integer</em> microseconds after 1970-01-01 00:00:00</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">TIMESTAMP_MILLIS(integer)</td>
+      <td style="text-align: left">Returns the TIMESTAMP that is <em>integer</em> milliseconds after 1970-01-01 00:00:00</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">TIMESTAMP_SECONDS(integer)</td>
+      <td style="text-align: left">Returns the TIMESTAMP that is <em>integer</em> seconds after 1970-01-01 00:00:00</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o p</td>
+      <td style="text-align: left">TO_DATE(string, format)</td>
+      <td style="text-align: left">Converts <em>string</em> to a date using the format <em>format</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o p</td>
+      <td style="text-align: left">TO_TIMESTAMP(string, format)</td>
+      <td style="text-align: left">Converts <em>string</em> to a timestamp using the format <em>format</em>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o p</td>
+      <td style="text-align: left">TRANSLATE(expr, fromString, toString)</td>
+      <td style="text-align: left">Returns <em>expr</em> with all occurrences of each character in <em>fromString</em> replaced by its corresponding character in <em>toString</em>. Characters in <em>expr</em> that are not in <em>fromString</em> are not replaced</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">UNIX_MICROS(timestamp)</td>
+      <td style="text-align: left">Returns the number of microseconds since 1970-01-01 00:00:00</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">UNIX_MILLIS(timestamp)</td>
+      <td style="text-align: left">Returns the number of milliseconds since 1970-01-01 00:00:00</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">UNIX_SECONDS(timestamp)</td>
+      <td style="text-align: left">Returns the number of seconds since 1970-01-01 00:00:00</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">UNIX_DATE(date)</td>
+      <td style="text-align: left">Returns the number of days since 1970-01-01</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">o</td>
+      <td style="text-align: left">XMLTRANSFORM(xml, xslt)</td>
+      <td style="text-align: left">Applies XSLT transform <em>xslt</em> to XML string <em>xml</em> and returns the result</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Note:</p>
+
+<ul>
+  <li>
+<code class="language-plaintext highlighter-rouge">JSON_TYPE</code> / <code class="language-plaintext highlighter-rouge">JSON_DEPTH</code> / <code class="language-plaintext highlighter-rouge">JSON_PRETTY</code> / <code class="language-plaintext highlighter-rouge">JSON_STORAGE_SIZE</code> return null if the argument is null</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">JSON_LENGTH</code> / <code class="language-plaintext highlighter-rouge">JSON_KEYS</code> / <code class="language-plaintext highlighter-rouge">JSON_REMOVE</code> return null if the first argument is null</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">JSON_TYPE</code> generally returns an upper-case string flag indicating the type of the JSON input. Currently supported supported type flags are:
+    <ul>
+      <li>INTEGER</li>
+      <li>STRING</li>
+      <li>FLOAT</li>
+      <li>DOUBLE</li>
+      <li>LONG</li>
+      <li>BOOLEAN</li>
+      <li>DATE</li>
+      <li>OBJECT</li>
+      <li>ARRAY</li>
+      <li>NULL</li>
+    </ul>
+  </li>
+  <li>
+<code class="language-plaintext highlighter-rouge">JSON_DEPTH</code> defines a JSON value’s depth as follows:
+    <ul>
+      <li>An empty array, empty object, or scalar value has depth 1;</li>
+      <li>A non-empty array containing only elements of depth 1 or non-empty object containing only member values of depth 1 has depth 2;</li>
+      <li>Otherwise, a JSON document has depth greater than 2.</li>
+    </ul>
+  </li>
+  <li>
+<code class="language-plaintext highlighter-rouge">JSON_LENGTH</code> defines a JSON value’s length as follows:
+    <ul>
+      <li>A scalar value has length 1;</li>
+      <li>The length of array or object is the number of elements is contains.</li>
+    </ul>
+  </li>
+</ul>
+
+<p>Dialect-specific aggregate functions.</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: left">C</th>
+      <th style="text-align: left">Operator syntax</th>
+      <th style="text-align: left">Description</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: left">b p</td>
+      <td style="text-align: left">ARRAY_AGG( [ ALL | DISTINCT ] value [ RESPECT NULLS | IGNORE NULLS ] [ ORDER BY orderItem [, orderItem ]* ] )</td>
+      <td style="text-align: left">Gathers values into arrays</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b p</td>
+      <td style="text-align: left">ARRAY_CONCAT_AGG( [ ALL | DISTINCT ] value [ ORDER BY orderItem [, orderItem ]* ] )</td>
+      <td style="text-align: left">Concatenates arrays into arrays</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">BOOL_AND(condition)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">EVERY</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">p</td>
+      <td style="text-align: left">BOOL_OR(condition)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">SOME</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">COUNTIF(condition)</td>
+      <td style="text-align: left">Returns the number of rows for which <em>condition</em> is TRUE; equivalent to <code class="language-plaintext highlighter-rouge">COUNT(*) FILTER (WHERE condition)</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">m</td>
+      <td style="text-align: left">GROUP_CONCAT( [ ALL | DISTINCT ] value [, value ]* [ ORDER BY orderItem [, orderItem ]* ] [ SEPARATOR separator ] )</td>
+      <td style="text-align: left">MySQL-specific variant of <code class="language-plaintext highlighter-rouge">LISTAGG</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">LOGICAL_AND(condition)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">EVERY</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b</td>
+      <td style="text-align: left">LOGICAL_OR(condition)</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">SOME</code>
+</td>
+    </tr>
+    <tr>
+      <td style="text-align: left">b p</td>
+      <td style="text-align: left">STRING_AGG( [ ALL | DISTINCT ] value [, separator] [ ORDER BY orderItem [, orderItem ]* ] )</td>
+      <td style="text-align: left">Synonym for <code class="language-plaintext highlighter-rouge">LISTAGG</code>
+</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Usage Examples:</p>
+
+<h5 id="json_type-example">JSON_TYPE example</h5>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="n">JSON_TYPE</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c1</span><span class="p">,</span>
+  <span class="n">JSON_TYPE</span><span class="p">(</span><span class="n">JSON_VALUE</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'lax $.b'</span> <span class="n">ERROR</span> <span class="k">ON</span> <span class="n">ERROR</span><span class="p">))</span> <span class="k">AS</span> <span class="n">c2</span><span class="p">,</span>
+  <span class="n">JSON_TYPE</span><span class="p">(</span><span class="n">JSON_VALUE</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[0]'</span> <span class="n">ERROR</span> <span class="k">ON</span> <span class="n">ERROR</span><span class="p">))</span> <span class="k">AS</span> <span class="n">c3</span><span class="p">,</span>
+  <span class="n">JSON_TYPE</span><span class="p">(</span><span class="n">JSON_VALUE</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[1]'</span> <span class="n">ERROR</span> <span class="k">ON</span> <span class="n">ERROR</span><span class="p">))</span> <span class="k">AS</span> <span class="n">c4</span>
+<span class="k">FROM</span> <span class="p">(</span><span class="k">VALUES</span> <span class="p">(</span><span class="s1">'{"a": [10, true],"b": "[10, true]"}'</span><span class="p">))</span> <span class="k">AS</span> <span class="n">t</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
+<span class="k">LIMIT</span> <span class="mi">10</span><span class="p">;</span></code></pre></figure>
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+      <th style="text-align: center">c2</th>
+      <th style="text-align: center">c3</th>
+      <th style="text-align: center">c4</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">OBJECT</td>
+      <td style="text-align: center">ARRAY</td>
+      <td style="text-align: center">INTEGER</td>
+      <td style="text-align: center">BOOLEAN</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h5 id="json_depth-example">JSON_DEPTH example</h5>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="n">JSON_DEPTH</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c1</span><span class="p">,</span>
+  <span class="n">JSON_DEPTH</span><span class="p">(</span><span class="n">JSON_VALUE</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'lax $.b'</span> <span class="n">ERROR</span> <span class="k">ON</span> <span class="n">ERROR</span><span class="p">))</span> <span class="k">AS</span> <span class="n">c2</span><span class="p">,</span>
+  <span class="n">JSON_DEPTH</span><span class="p">(</span><span class="n">JSON_VALUE</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[0]'</span> <span class="n">ERROR</span> <span class="k">ON</span> <span class="n">ERROR</span><span class="p">))</span> <span class="k">AS</span> <span class="n">c3</span><span class="p">,</span>
+  <span class="n">JSON_DEPTH</span><span class="p">(</span><span class="n">JSON_VALUE</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[1]'</span> <span class="n">ERROR</span> <span class="k">ON</span> <span class="n">ERROR</span><span class="p">))</span> <span class="k">AS</span> <span class="n">c4</span>
+<span class="k">FROM</span> <span class="p">(</span><span class="k">VALUES</span> <span class="p">(</span><span class="s1">'{"a": [10, true],"b": "[10, true]"}'</span><span class="p">))</span> <span class="k">AS</span> <span class="n">t</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
+<span class="k">LIMIT</span> <span class="mi">10</span><span class="p">;</span></code></pre></figure>
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+      <th style="text-align: center">c2</th>
+      <th style="text-align: center">c3</th>
+      <th style="text-align: center">c4</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">3</td>
+      <td style="text-align: center">2</td>
+      <td style="text-align: center">1</td>
+      <td style="text-align: center">1</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h5 id="json_length-example">JSON_LENGTH example</h5>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="n">JSON_LENGTH</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c1</span><span class="p">,</span>
+  <span class="n">JSON_LENGTH</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'lax $.a'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c2</span><span class="p">,</span>
+  <span class="n">JSON_LENGTH</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[0]'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c3</span><span class="p">,</span>
+  <span class="n">JSON_LENGTH</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[1]'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c4</span>
+<span class="k">FROM</span> <span class="p">(</span><span class="k">VALUES</span> <span class="p">(</span><span class="s1">'{"a": [10, true]}'</span><span class="p">))</span> <span class="k">AS</span> <span class="n">t</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
+<span class="k">LIMIT</span> <span class="mi">10</span><span class="p">;</span></code></pre></figure>
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+      <th style="text-align: center">c2</th>
+      <th style="text-align: center">c3</th>
+      <th style="text-align: center">c4</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">1</td>
+      <td style="text-align: center">2</td>
+      <td style="text-align: center">1</td>
+      <td style="text-align: center">1</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h5 id="json_keys-example">JSON_KEYS example</h5>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="n">JSON_KEYS</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c1</span><span class="p">,</span>
+  <span class="n">JSON_KEYS</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'lax $.a'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c2</span><span class="p">,</span>
+  <span class="n">JSON_KEYS</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'lax $.b'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c2</span><span class="p">,</span>
+  <span class="n">JSON_KEYS</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[0]'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c3</span><span class="p">,</span>
+  <span class="n">JSON_KEYS</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'strict $.a[1]'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c4</span>
+<span class="k">FROM</span> <span class="p">(</span><span class="k">VALUES</span> <span class="p">(</span><span class="s1">'{"a": [10, true],"b": {"c": 30}}'</span><span class="p">))</span> <span class="k">AS</span> <span class="n">t</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
+<span class="k">LIMIT</span> <span class="mi">10</span><span class="p">;</span></code></pre></figure>
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+      <th style="text-align: center">c2</th>
+      <th style="text-align: center">c3</th>
+      <th style="text-align: center">c4</th>
+      <th style="text-align: center">c5</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">[“a”, “b”]</td>
+      <td style="text-align: center">NULL</td>
+      <td style="text-align: center">[“c”]</td>
+      <td style="text-align: center">NULL</td>
+      <td style="text-align: center">NULL</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h5 id="json_remove-example">JSON_REMOVE example</h5>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="n">JSON_REMOVE</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="s1">'$[1]'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c1</span>
+<span class="k">FROM</span> <span class="p">(</span><span class="k">VALUES</span> <span class="p">(</span><span class="s1">'["a", ["b", "c"], "d"]'</span><span class="p">))</span> <span class="k">AS</span> <span class="n">t</span><span class="p">(</span><span class="n">v</span><span class="p">)</span>
+<span class="k">LIMIT</span> <span class="mi">10</span><span class="p">;</span></code></pre></figure>
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">[“a”, “d”]</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h5 id="json_storage_size-example">JSON_STORAGE_SIZE example</h5>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span>
+<span class="n">JSON_STORAGE_SIZE</span><span class="p">(</span><span class="s1">'[100, </span><span class="se">\"</span><span class="s1">sakila</span><span class="se">\"</span><span class="s1">, [1, 3, 5], 425.05]'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c1</span><span class="p">,</span>
+<span class="n">JSON_STORAGE_SIZE</span><span class="p">(</span><span class="s1">'{</span><span class="se">\"</span><span class="s1">a</span><span class="se">\"</span><span class="s1">: 10, </span><span class="se">\"</span><span class="s1">b</span><span class="se">\"</span><span class="s1">: </span><span class="se">\"</span><span class="s1">a</span><span class="se">\"</span><span class="s1">, </span><span class="se">\"</span><span class="s1">c</span><span class="se">\"</span><span class= [...]
+<span class="n">JSON_STORAGE_SIZE</span><span class="p">(</span><span class="s1">'{</span><span class="se">\"</span><span class="s1">a</span><span class="se">\"</span><span class="s1">: 10, </span><span class="se">\"</span><span class="s1">b</span><span class="se">\"</span><span class="s1">: </span><span class="se">\"</span><span class="s1">xyz</span><span class="se">\"</span><span class="s1">, </span><span class="se">\"</span><span class="s1">c</span><span class="se">\"</span><span clas [...]
+<span class="n">JSON_STORAGE_SIZE</span><span class="p">(</span><span class="s1">'[100, </span><span class="se">\"</span><span class="s1">json</span><span class="se">\"</span><span class="s1">, [[10, 20, 30], 3, 5], 425.05]'</span><span class="p">)</span> <span class="k">AS</span> <span class="n">c4</span>
+<span class="k">limit</span> <span class="mi">10</span><span class="p">;</span></code></pre></figure>
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+      <th style="text-align: center">c2</th>
+      <th style="text-align: center">c3</th>
+      <th style="text-align: center">c4</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">29</td>
+      <td style="text-align: center">35</td>
+      <td style="text-align: center">37</td>
+      <td style="text-align: center">36</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="decode-example">DECODE example</h4>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="n">DECODE</span><span class="p">(</span><span class="n">f1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'aa'</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'bb'</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s1">'cc'</span>< [...]
+  <span class="n">DECODE</span><span class="p">(</span><span class="n">f2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'aa'</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'bb'</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s1">'cc'</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="s1">'dd'</span> [...]
+  <span class="n">DECODE</span><span class="p">(</span><span class="n">f3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'aa'</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'bb'</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s1">'cc'</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="s1">'dd'</span> [...]
+  <span class="n">DECODE</span><span class="p">(</span><span class="n">f4</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'aa'</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'bb'</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s1">'cc'</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="s1">'dd'</span> [...]
+  <span class="n">DECODE</span><span class="p">(</span><span class="n">f5</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">'aa'</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'bb'</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s1">'cc'</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="s1">'dd'</span> [...]
+<span class="k">FROM</span> <span class="p">(</span><span class="k">VALUES</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span> <span class="k">AS</span> <span class="n">t</span><span class="p">(</span><span class="n">f1</span><span class="p">,</span> <span class [...]
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+      <th style="text-align: center">c2</th>
+      <th style="text-align: center">c3</th>
+      <th style="text-align: center">c4</th>
+      <th style="text-align: center">c5</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">aa</td>
+      <td style="text-align: center">bb</td>
+      <td style="text-align: center">cc</td>
+      <td style="text-align: center">dd</td>
+      <td style="text-align: center">ee</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<h4 id="translate-example">TRANSLATE example</h4>
+
+<p>SQL</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="k">TRANSLATE</span><span class="p">(</span><span class="s1">'Aa*Bb*Cc</span><span class="se">''</span><span class="s1">D*d'</span><span class="p">,</span> <span class="s1">' */</span><span class="se">''</span><span class="s1">%'</span><span class="p">,</span> <span class="s1">'_'</span><span class="p">)</span> <span class="k">as</span> <span class="n">c1</span><span class= [...]
+  <span class="k">TRANSLATE</span><span class="p">(</span><span class="s1">'Aa/Bb/Cc</span><span class="se">''</span><span class="s1">D/d'</span><span class="p">,</span> <span class="s1">' */</span><span class="se">''</span><span class="s1">%'</span><span class="p">,</span> <span class="s1">'_'</span><span class="p">)</span> <span class="k">as</span> <span class="n">c2</span><span class="p">,</span>
+  <span class="k">TRANSLATE</span><span class="p">(</span><span class="s1">'Aa Bb Cc</span><span class="se">''</span><span class="s1">D d'</span><span class="p">,</span> <span class="s1">' */</span><span class="se">''</span><span class="s1">%'</span><span class="p">,</span> <span class="s1">'_'</span><span class="p">)</span> <span class="k">as</span> <span class="n">c3</span><span class="p">,</span>
+  <span class="k">TRANSLATE</span><span class="p">(</span><span class="s1">'Aa%Bb%Cc</span><span class="se">''</span><span class="s1">D%d'</span><span class="p">,</span> <span class="s1">' */</span><span class="se">''</span><span class="s1">%'</span><span class="p">,</span> <span class="s1">'_'</span><span class="p">)</span> <span class="k">as</span> <span class="n">c4</span>
+<span class="k">FROM</span> <span class="p">(</span><span class="k">VALUES</span> <span class="p">(</span><span class="k">true</span><span class="p">))</span> <span class="k">AS</span> <span class="n">t</span><span class="p">(</span><span class="n">f0</span><span class="p">);</span></code></pre></figure>
+
+<p>Result</p>
+
+<div class="scroll-table-style"><table>
+  <thead>
+    <tr>
+      <th style="text-align: center">c1</th>
+      <th style="text-align: center">c2</th>
+      <th style="text-align: center">c3</th>
+      <th style="text-align: center">c4</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td style="text-align: center">Aa_Bb_CcD_d</td>
+      <td style="text-align: center">Aa_Bb_CcD_d</td>
+      <td style="text-align: center">Aa_Bb_CcD_d</td>
+      <td style="text-align: center">Aa_Bb_CcD_d</td>
+    </tr>
+  </tbody>
+</table></div>
+
+<p>Not implemented:</p>
+
+<ul>
+  <li>JSON_INSERT</li>
+  <li>JSON_SET</li>
+  <li>JSON_REPLACE</li>
+</ul>
+
+<h2 id="user-defined-functions">User-defined functions</h2>
+
+<p>Calcite is extensible. You can define each kind of function using user code.
+For each kind of function there are often several ways to define a function,
+varying from convenient to efficient.</p>
+
+<p>To implement a <em>scalar function</em>, there are 3 options:</p>
+
+<ul>
+  <li>Create a class with a public static <code class="language-plaintext highlighter-rouge">eval</code> method,
+and register the class;</li>
+  <li>Create a class with a public non-static <code class="language-plaintext highlighter-rouge">eval</code> method,
+and a public constructor with no arguments,
+and register the class;</li>
+  <li>Create a class with one or more public static methods,
+and register each class/method combination.</li>
+</ul>
+
+<p>To implement an <em>aggregate function</em>, there are 2 options:</p>
+
+<ul>
+  <li>Create a class with public static <code class="language-plaintext highlighter-rouge">init</code>, <code class="language-plaintext highlighter-rouge">add</code> and <code class="language-plaintext highlighter-rouge">result</code> methods,
+and register the class;</li>
+  <li>Create a class with public non-static <code class="language-plaintext highlighter-rouge">init</code>, <code class="language-plaintext highlighter-rouge">add</code> and <code class="language-plaintext highlighter-rouge">result</code> methods,
+and a  public constructor with no arguments,
+and register the class.</li>
+</ul>
+
+<p>Optionally, add a public <code class="language-plaintext highlighter-rouge">merge</code> method to the class; this allows Calcite to
+generate code that merges sub-totals.</p>
+
+<p>Optionally, make your class implement the
+<a href="/javadocAggregate/org/apache/calcite/sql/SqlSplittableAggFunction.html">SqlSplittableAggFunction</a>
+interface; this allows Calcite to decompose the function across several stages
+of aggregation, roll up from summary tables, and push it through joins.</p>
+
+<p>To implement a <em>table function</em>, there are 3 options:</p>
+
+<ul>
+  <li>Create a class with a static <code class="language-plaintext highlighter-rouge">eval</code> method that returns
+<a href="/javadocAggregate/org/apache/calcite/schema/ScannableTable.html">ScannableTable</a>
+or
+<a href="/javadocAggregate/org/apache/calcite/schema/QueryableTable.html">QueryableTable</a>,
+and register the class;</li>
+  <li>Create a class with a non-static <code class="language-plaintext highlighter-rouge">eval</code> method that returns
+<a href="/javadocAggregate/org/apache/calcite/schema/ScannableTable.html">ScannableTable</a>
+or
+<a href="/javadocAggregate/org/apache/calcite/schema/QueryableTable.html">QueryableTable</a>,
+and register the class;</li>
+  <li>Create a class with one or more public static methods that return
+<a href="/javadocAggregate/org/apache/calcite/schema/ScannableTable.html">ScannableTable</a>
+or
+<a href="/javadocAggregate/org/apache/calcite/schema/QueryableTable.html">QueryableTable</a>,
+and register each class/method combination.</li>
+</ul>
+
+<p>To implement a <em>table macro</em>, there are 3 options:</p>
+
+<ul>
+  <li>Create a class with a static <code class="language-plaintext highlighter-rouge">eval</code> method that returns
+<a href="/javadocAggregate/org/apache/calcite/schema/TranslatableTable.html">TranslatableTable</a>,
+and register the class;</li>
+  <li>Create a class with a non-static <code class="language-plaintext highlighter-rouge">eval</code> method that returns
+<a href="/javadocAggregate/org/apache/calcite/schema/TranslatableTable.html">TranslatableTable</a>,
+and register the class;</li>
+  <li>Create a class with one or more public static methods that return
+<a href="/javadocAggregate/org/apache/calcite/schema/TranslatableTable.html">TranslatableTable</a>,
+and register each class/method combination.</li>
+</ul>
+
+<p>Calcite deduces the parameter types and result type of a function from the
+parameter and return types of the Java method that implements it. Further, you
+can specify the name and optionality of each parameter using the
+<a href="/javadocAggregate/org/apache/calcite/linq4j/function/Parameter.html">Parameter</a>
+annotation.</p>
+
+<h3 id="calling-functions-with-named-and-optional-parameters">Calling functions with named and optional parameters</h3>
+
+<p>Usually when you call a function, you need to specify all of its parameters,
+in order. But that can be a problem if a function has a lot of parameters,
+and especially if you want to add more parameters over time.</p>
+
+<p>To solve this problem, the SQL standard allows you to pass parameters by name,
+and to define parameters which are optional (that is, have a default value
+that is used if they are not specified).</p>
+
+<p>Suppose you have a function <code class="language-plaintext highlighter-rouge">f</code>, declared as in the following pseudo syntax:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">FUNCTION</span> <span class="n">f</span><span class="p">(</span>
+  <span class="nb">INTEGER</span> <span class="n">a</span><span class="p">,</span>
+  <span class="nb">INTEGER</span> <span class="n">b</span> <span class="k">DEFAULT</span> <span class="k">NULL</span><span class="p">,</span>
+  <span class="nb">INTEGER</span> <span class="k">c</span><span class="p">,</span>
+  <span class="nb">INTEGER</span> <span class="n">d</span> <span class="k">DEFAULT</span> <span class="k">NULL</span><span class="p">,</span>
+  <span class="nb">INTEGER</span> <span class="n">e</span> <span class="k">DEFAULT</span> <span class="k">NULL</span><span class="p">)</span> <span class="k">RETURNS</span> <span class="nb">INTEGER</span></code></pre></figure>
+
+<p>All of the function’s parameters have names, and parameters <code class="language-plaintext highlighter-rouge">b</code>, <code class="language-plaintext highlighter-rouge">d</code> and <code class="language-plaintext highlighter-rouge">e</code>
+have a default value of <code class="language-plaintext highlighter-rouge">NULL</code> and are therefore optional.
+(In Calcite, <code class="language-plaintext highlighter-rouge">NULL</code> is the only allowable default value for optional parameters;
+this may change
+<a href="https://issues.apache.org/jira/browse/CALCITE-947">in future</a>.)</p>
+
+<p>When calling a function with optional parameters,
+you can omit optional arguments at the end of the list, or use the <code class="language-plaintext highlighter-rouge">DEFAULT</code>
+keyword for any optional arguments.
+Here are some examples:</p>
+
+<ul>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(1, 2, 3, 4, 5)</code> provides a value to each parameter, in order;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(1, 2, 3, 4)</code> omits <code class="language-plaintext highlighter-rouge">e</code>, which gets its default value, <code class="language-plaintext highlighter-rouge">NULL</code>;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(1, DEFAULT, 3)</code> omits <code class="language-plaintext highlighter-rouge">d</code> and <code class="language-plaintext highlighter-rouge">e</code>,
+and specifies to use the default value of <code class="language-plaintext highlighter-rouge">b</code>;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(1, DEFAULT, 3, DEFAULT, DEFAULT)</code> has the same effect as the previous
+example;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(1, 2)</code> is not legal, because <code class="language-plaintext highlighter-rouge">c</code> is not optional;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(1, 2, DEFAULT, 4)</code> is not legal, because <code class="language-plaintext highlighter-rouge">c</code> is not optional.</li>
+</ul>
+
+<p>You can specify arguments by name using the <code class="language-plaintext highlighter-rouge">=&gt;</code> syntax.
+If one argument is named, they all must be.
+Arguments may be in any other, but must not specify any argument more than once,
+and you need to provide a value for every parameter which is not optional.
+Here are some examples:</p>
+
+<ul>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(c =&gt; 3, d =&gt; 1, a =&gt; 0)</code> is equivalent to <code class="language-plaintext highlighter-rouge">f(0, NULL, 3, 1, NULL)</code>;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">f(c =&gt; 3, d =&gt; 1)</code> is not legal, because you have not specified a value for
+<code class="language-plaintext highlighter-rouge">a</code> and <code class="language-plaintext highlighter-rouge">a</code> is not optional.</li>
+</ul>
+
+<h3 id="sql-hints">SQL Hints</h3>
+
+<p>A hint is an instruction to the optimizer. When writing SQL, you may know information about
+the data unknown to the optimizer. Hints enable you to make decisions normally made by the optimizer.</p>
+
+<ul>
+  <li>Planner enforcers: there’s no perfect planner, so it makes sense to implement hints to
+allow user better control the execution. For instance: “never merge this subquery with others” (<code class="language-plaintext highlighter-rouge">/*+ no_merge */</code>);
+“treat those tables as leading ones” (<code class="language-plaintext highlighter-rouge">/*+ leading */</code>) to affect join ordering, etc;</li>
+  <li>Append meta data/statistics: some statistics like “table index for scan” or “skew info of some shuffle keys”
+are somehow dynamic for the query, it would be very convenient to config them with hints because
+our planning metadata from the planner is very often not very accurate;</li>
+  <li>Operator resource constraints: for many cases, we would give a default resource configuration
+for the execution operators,
+i.e. min parallelism, memory (resource consuming UDF), special resource requirement (GPU or SSD disk) …
+It would be very flexible to profile the resource with hints per query (not the Job).</li>
+</ul>
+
+<h4 id="syntax">Syntax</h4>
+
+<p>Calcite supports hints in two locations:</p>
+
+<ul>
+  <li>Query Hint: right after the <code class="language-plaintext highlighter-rouge">SELECT</code> keyword;</li>
+  <li>Table Hint: right after the referenced table name.</li>
+</ul>
+
+<p>For example:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">SELECT</span> <span class="cm">/*+ hint1, hint2(a=1, b=2) */</span>
+<span class="p">...</span>
+<span class="k">FROM</span>
+  <span class="n">tableName</span> <span class="cm">/*+ hint3(5, 'x') */</span>
+<span class="k">JOIN</span>
+  <span class="n">tableName</span> <span class="cm">/*+ hint4(c=id), hint5 */</span>
+<span class="p">...</span></code></pre></figure>
+
+<p>The syntax is as follows:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">hintComment</span><span class="p">:</span>
+      <span class="s1">'/*+'</span> <span class="n">hint</span> <span class="p">[,</span> <span class="n">hint</span> <span class="p">]</span><span class="o">*</span> <span class="s1">'*/'</span>
+
+<span class="n">hint</span><span class="p">:</span>
+      <span class="n">hintName</span>
+  <span class="o">|</span>   <span class="n">hintName</span> <span class="s1">'('</span> <span class="n">optionKey</span> <span class="s1">'='</span> <span class="n">optionVal</span> <span class="p">[,</span> <span class="n">optionKey</span> <span class="s1">'='</span> <span class="n">optionVal</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="n">hintName</span> <span class="s1">'('</span> <span class="n">hintOption</span> <span class="p">[,</span> <span class="n">hintOption</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+
+<span class="n">optionKey</span><span class="p">:</span>
+      <span class="n">simpleIdentifier</span>
+  <span class="o">|</span>   <span class="n">stringLiteral</span>
+
+<span class="n">optionVal</span><span class="p">:</span>
+      <span class="n">stringLiteral</span>
+
+<span class="n">hintOption</span><span class="p">:</span>
+      <span class="n">simpleIdentifier</span>
+   <span class="o">|</span>  <span class="n">numericLiteral</span>
+   <span class="o">|</span>  <span class="n">stringLiteral</span></code></pre></figure>
+
+<p>It is experimental in Calcite, and yet not fully implemented, what we have implemented are:</p>
+
+<ul>
+  <li>The parser support for the syntax above;</li>
+  <li>
+<code class="language-plaintext highlighter-rouge">RelHint</code> to represent a hint item;</li>
+  <li>Mechanism to propagate the hints, during sql-to-rel conversion and planner planning.</li>
+</ul>
+
+<p>We do not add any builtin hint items yet, would introduce more if we think the hints is stable enough.</p>
+
+<h3 id="match_recognize">MATCH_RECOGNIZE</h3>
+
+<p><code class="language-plaintext highlighter-rouge">MATCH_RECOGNIZE</code> is a SQL extension for recognizing sequences of
+events in complex event processing (CEP).</p>
+
+<p>It is experimental in Calcite, and yet not fully implemented.</p>
+
+<h4 id="syntax-1">Syntax</h4>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">matchRecognize</span><span class="p">:</span>
+      <span class="n">MATCH_RECOGNIZE</span> <span class="s1">'('</span>
+      <span class="p">[</span> <span class="k">PARTITION</span> <span class="k">BY</span> <span class="n">expression</span> <span class="p">[,</span> <span class="n">expression</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">ORDER</span> <span class="k">BY</span> <span class="n">orderItem</span> <span class="p">[,</span> <span class="n">orderItem</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">MEASURES</span> <span class="n">measureColumn</span> <span class="p">[,</span> <span class="n">measureColumn</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">ONE</span> <span class="k">ROW</span> <span class="n">PER</span> <span class="k">MATCH</span> <span class="o">|</span> <span class="k">ALL</span> <span class="k">ROWS</span> <span class="n">PER</span> <span class="k">MATCH</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">AFTER</span> <span class="k">MATCH</span> <span class="n">skip</span> <span class="p">]</span>
+      <span class="n">PATTERN</span> <span class="s1">'('</span> <span class="n">pattern</span> <span class="s1">')'</span>
+      <span class="p">[</span> <span class="n">WITHIN</span> <span class="n">intervalLiteral</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="n">SUBSET</span> <span class="n">subsetItem</span> <span class="p">[,</span> <span class="n">subsetItem</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+      <span class="n">DEFINE</span> <span class="k">variable</span> <span class="k">AS</span> <span class="n">condition</span> <span class="p">[,</span> <span class="k">variable</span> <span class="k">AS</span> <span class="n">condition</span> <span class="p">]</span><span class="o">*</span>
+      <span class="s1">')'</span>
+
+<span class="n">skip</span><span class="p">:</span>
+      <span class="n">SKIP</span> <span class="k">TO</span> <span class="k">NEXT</span> <span class="k">ROW</span>
+  <span class="o">|</span>   <span class="n">SKIP</span> <span class="n">PAST</span> <span class="k">LAST</span> <span class="k">ROW</span>
+  <span class="o">|</span>   <span class="n">SKIP</span> <span class="k">TO</span> <span class="k">FIRST</span> <span class="k">variable</span>
+  <span class="o">|</span>   <span class="n">SKIP</span> <span class="k">TO</span> <span class="k">LAST</span> <span class="k">variable</span>
+  <span class="o">|</span>   <span class="n">SKIP</span> <span class="k">TO</span> <span class="k">variable</span>
+
+<span class="n">subsetItem</span><span class="p">:</span>
+      <span class="k">variable</span> <span class="o">=</span> <span class="s1">'('</span> <span class="k">variable</span> <span class="p">[,</span> <span class="k">variable</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+
+<span class="n">measureColumn</span><span class="p">:</span>
+      <span class="n">expression</span> <span class="k">AS</span> <span class="k">alias</span>
+
+<span class="n">pattern</span><span class="p">:</span>
+      <span class="n">patternTerm</span> <span class="p">[</span> <span class="s1">'|'</span> <span class="n">patternTerm</span> <span class="p">]</span><span class="o">*</span>
+
+<span class="n">patternTerm</span><span class="p">:</span>
+      <span class="n">patternFactor</span> <span class="p">[</span> <span class="n">patternFactor</span> <span class="p">]</span><span class="o">*</span>
+
+<span class="n">patternFactor</span><span class="p">:</span>
+      <span class="n">patternPrimary</span> <span class="p">[</span> <span class="n">patternQuantifier</span> <span class="p">]</span>
+
+<span class="n">patternPrimary</span><span class="p">:</span>
+      <span class="k">variable</span>
+  <span class="o">|</span>   <span class="s1">'$'</span>
+  <span class="o">|</span>   <span class="s1">'^'</span>
+  <span class="o">|</span>   <span class="s1">'('</span> <span class="p">[</span> <span class="n">pattern</span> <span class="p">]</span> <span class="s1">')'</span>
+  <span class="o">|</span>   <span class="s1">'{-'</span> <span class="n">pattern</span> <span class="s1">'-}'</span>
+  <span class="o">|</span>   <span class="n">PERMUTE</span> <span class="s1">'('</span> <span class="n">pattern</span> <span class="p">[,</span> <span class="n">pattern</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+
+<span class="n">patternQuantifier</span><span class="p">:</span>
+      <span class="s1">'*'</span>
+  <span class="o">|</span>   <span class="s1">'*?'</span>
+  <span class="o">|</span>   <span class="s1">'+'</span>
+  <span class="o">|</span>   <span class="s1">'+?'</span>
+  <span class="o">|</span>   <span class="s1">'?'</span>
+  <span class="o">|</span>   <span class="s1">'??'</span>
+  <span class="o">|</span>   <span class="s1">'{'</span> <span class="p">{</span> <span class="p">[</span> <span class="n">minRepeat</span> <span class="p">],</span> <span class="p">[</span> <span class="n">maxRepeat</span> <span class="p">]</span> <span class="p">}</span> <span class="s1">'}'</span> <span class="p">[</span><span class="s1">'?'</span><span class="p">]</span>
+  <span class="o">|</span>   <span class="s1">'{'</span> <span class="n">repeat</span> <span class="s1">'}'</span>
+
+<span class="n">intervalLiteral</span><span class="p">:</span>
+      <span class="n">INTERVAL</span> <span class="s1">'string'</span> <span class="n">timeUnit</span> <span class="p">[</span> <span class="k">TO</span> <span class="n">timeUnit</span> <span class="p">]</span></code></pre></figure>
+
+<p>In <em>patternQuantifier</em>, <em>repeat</em> is a positive integer,
+and <em>minRepeat</em> and <em>maxRepeat</em> are non-negative integers.</p>
+
+<h3 id="ddl-extensions">DDL Extensions</h3>
+
+<p>DDL extensions are only available in the calcite-server module.
+To enable, include <code class="language-plaintext highlighter-rouge">calcite-server.jar</code> in your class path, and add
+<code class="language-plaintext highlighter-rouge">parserFactory=org.apache.calcite.sql.parser.ddl.SqlDdlParserImpl#FACTORY</code>
+to the JDBC connect string (see connect string property
+<a href="/javadocAggregate/org/apache/calcite/config/CalciteConnectionProperty.html#PARSER_FACTORY">parserFactory</a>).</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">ddlStatement</span><span class="p">:</span>
+      <span class="n">createSchemaStatement</span>
+  <span class="o">|</span>   <span class="n">createForeignSchemaStatement</span>
+  <span class="o">|</span>   <span class="n">createTableStatement</span>
+  <span class="o">|</span>   <span class="n">createViewStatement</span>
+  <span class="o">|</span>   <span class="n">createMaterializedViewStatement</span>
+  <span class="o">|</span>   <span class="n">createTypeStatement</span>
+  <span class="o">|</span>   <span class="n">createFunctionStatement</span>
+  <span class="o">|</span>   <span class="n">dropSchemaStatement</span>
+  <span class="o">|</span>   <span class="n">dropForeignSchemaStatement</span>
+  <span class="o">|</span>   <span class="n">dropTableStatement</span>
+  <span class="o">|</span>   <span class="n">dropViewStatement</span>
+  <span class="o">|</span>   <span class="n">dropMaterializedViewStatement</span>
+  <span class="o">|</span>   <span class="n">dropTypeStatement</span>
+  <span class="o">|</span>   <span class="n">dropFunctionStatement</span>
+
+<span class="n">createSchemaStatement</span><span class="p">:</span>
+      <span class="k">CREATE</span> <span class="p">[</span> <span class="k">OR</span> <span class="k">REPLACE</span> <span class="p">]</span> <span class="k">SCHEMA</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">NOT</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+
+<span class="n">createForeignSchemaStatement</span><span class="p">:</span>
+      <span class="k">CREATE</span> <span class="p">[</span> <span class="k">OR</span> <span class="k">REPLACE</span> <span class="p">]</span> <span class="k">FOREIGN</span> <span class="k">SCHEMA</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">NOT</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+      <span class="p">(</span>
+          <span class="k">TYPE</span> <span class="s1">'type'</span>
+      <span class="o">|</span>   <span class="n">LIBRARY</span> <span class="s1">'com.example.calcite.ExampleSchemaFactory'</span>
+      <span class="p">)</span>
+      <span class="p">[</span> <span class="k">OPTIONS</span> <span class="s1">'('</span> <span class="k">option</span> <span class="p">[,</span> <span class="k">option</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+
+<span class="k">option</span><span class="p">:</span>
+      <span class="n">name</span> <span class="n">literal</span>
+
+<span class="n">createTableStatement</span><span class="p">:</span>
+      <span class="k">CREATE</span> <span class="k">TABLE</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">NOT</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+      <span class="p">[</span> <span class="s1">'('</span> <span class="n">tableElement</span> <span class="p">[,</span> <span class="n">tableElement</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">AS</span> <span class="n">query</span> <span class="p">]</span>
+
+<span class="n">createTypeStatement</span><span class="p">:</span>
+      <span class="k">CREATE</span> <span class="p">[</span> <span class="k">OR</span> <span class="k">REPLACE</span> <span class="p">]</span> <span class="k">TYPE</span> <span class="n">name</span> <span class="k">AS</span>
+      <span class="p">{</span>
+          <span class="n">baseType</span>
+      <span class="o">|</span>   <span class="s1">'('</span> <span class="n">attributeDef</span> <span class="p">[,</span> <span class="n">attributeDef</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="p">}</span>
+
+<span class="n">attributeDef</span><span class="p">:</span>
+      <span class="n">attributeName</span> <span class="k">type</span>
+      <span class="p">[</span> <span class="k">COLLATE</span> <span class="k">collation</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">NULL</span> <span class="o">|</span> <span class="k">NOT</span> <span class="k">NULL</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">DEFAULT</span> <span class="n">expression</span> <span class="p">]</span>
+
+<span class="n">tableElement</span><span class="p">:</span>
+      <span class="n">columnName</span> <span class="k">type</span> <span class="p">[</span> <span class="n">columnGenerator</span> <span class="p">]</span> <span class="p">[</span> <span class="n">columnConstraint</span> <span class="p">]</span>
+  <span class="o">|</span>   <span class="n">columnName</span>
+  <span class="o">|</span>   <span class="n">tableConstraint</span>
+
+<span class="n">columnGenerator</span><span class="p">:</span>
+      <span class="k">DEFAULT</span> <span class="n">expression</span>
+  <span class="o">|</span>   <span class="p">[</span> <span class="k">GENERATED</span> <span class="n">ALWAYS</span> <span class="p">]</span> <span class="k">AS</span> <span class="s1">'('</span> <span class="n">expression</span> <span class="s1">')'</span>
+      <span class="p">{</span> <span class="n">VIRTUAL</span> <span class="o">|</span> <span class="n">STORED</span> <span class="p">}</span>
+
+<span class="n">columnConstraint</span><span class="p">:</span>
+      <span class="p">[</span> <span class="k">CONSTRAINT</span> <span class="n">name</span> <span class="p">]</span>
+      <span class="p">[</span> <span class="k">NOT</span> <span class="p">]</span> <span class="k">NULL</span>
+
+<span class="n">tableConstraint</span><span class="p">:</span>
+      <span class="p">[</span> <span class="k">CONSTRAINT</span> <span class="n">name</span> <span class="p">]</span>
+      <span class="p">{</span>
+          <span class="k">CHECK</span> <span class="s1">'('</span> <span class="n">expression</span> <span class="s1">')'</span>
+      <span class="o">|</span>   <span class="k">PRIMARY</span> <span class="k">KEY</span> <span class="s1">'('</span> <span class="n">columnName</span> <span class="p">[,</span> <span class="n">columnName</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="o">|</span>   <span class="k">UNIQUE</span> <span class="s1">'('</span> <span class="n">columnName</span> <span class="p">[,</span> <span class="n">columnName</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span>
+      <span class="p">}</span>
+
+<span class="n">createViewStatement</span><span class="p">:</span>
+      <span class="k">CREATE</span> <span class="p">[</span> <span class="k">OR</span> <span class="k">REPLACE</span> <span class="p">]</span> <span class="k">VIEW</span> <span class="n">name</span>
+      <span class="p">[</span> <span class="s1">'('</span> <span class="n">columnName</span> <span class="p">[,</span> <span class="n">columnName</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="k">AS</span> <span class="n">query</span>
+
+<span class="n">createMaterializedViewStatement</span><span class="p">:</span>
+      <span class="k">CREATE</span> <span class="n">MATERIALIZED</span> <span class="k">VIEW</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">NOT</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+      <span class="p">[</span> <span class="s1">'('</span> <span class="n">columnName</span> <span class="p">[,</span> <span class="n">columnName</span> <span class="p">]</span><span class="o">*</span> <span class="s1">')'</span> <span class="p">]</span>
+      <span class="k">AS</span> <span class="n">query</span>
+
+<span class="n">createFunctionStatement</span><span class="p">:</span>
+      <span class="k">CREATE</span> <span class="p">[</span> <span class="k">OR</span> <span class="k">REPLACE</span> <span class="p">]</span> <span class="k">FUNCTION</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">NOT</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+      <span class="k">AS</span> <span class="n">classNameLiteral</span>
+      <span class="p">[</span> <span class="k">USING</span>  <span class="n">usingFile</span> <span class="p">[,</span> <span class="n">usingFile</span> <span class="p">]</span><span class="o">*</span> <span class="p">]</span>
+
+<span class="n">usingFile</span><span class="p">:</span>
+      <span class="p">{</span> <span class="n">JAR</span> <span class="o">|</span> <span class="n">FILE</span> <span class="o">|</span> <span class="n">ARCHIVE</span> <span class="p">}</span> <span class="n">filePathLiteral</span>
+
+<span class="n">dropSchemaStatement</span><span class="p">:</span>
+      <span class="k">DROP</span> <span class="k">SCHEMA</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+
+<span class="n">dropForeignSchemaStatement</span><span class="p">:</span>
+      <span class="k">DROP</span> <span class="k">FOREIGN</span> <span class="k">SCHEMA</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+
+<span class="n">dropTableStatement</span><span class="p">:</span>
+      <span class="k">DROP</span> <span class="k">TABLE</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+
+<span class="n">dropViewStatement</span><span class="p">:</span>
+      <span class="k">DROP</span> <span class="k">VIEW</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+
+<span class="n">dropMaterializedViewStatement</span><span class="p">:</span>
+      <span class="k">DROP</span> <span class="n">MATERIALIZED</span> <span class="k">VIEW</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+
+<span class="n">dropTypeStatement</span><span class="p">:</span>
+      <span class="k">DROP</span> <span class="k">TYPE</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span>
+
+<span class="n">dropFunctionStatement</span><span class="p">:</span>
+      <span class="k">DROP</span> <span class="k">FUNCTION</span> <span class="p">[</span> <span class="n">IF</span> <span class="k">EXISTS</span> <span class="p">]</span> <span class="n">name</span></code></pre></figure>
+
+<p>In <em>createTableStatement</em>, if you specify <em>AS query</em>, you may omit the list of
+<em>tableElement</em>s, or you can omit the data type of any <em>tableElement</em>, in which
+case it just renames the underlying column.</p>
+
+<p>In <em>columnGenerator</em>, if you do not specify <code class="language-plaintext highlighter-rouge">VIRTUAL</code> or <code class="language-plaintext highlighter-rouge">STORED</code> for a
+generated column, <code class="language-plaintext highlighter-rouge">VIRTUAL</code> is the default.</p>
+
+<p>In <em>createFunctionStatement</em> and <em>usingFile</em>, <em>classNameLiteral</em>
+and <em>filePathLiteral</em> are character literals.</p>
+
+<h4 id="declaring-objects-for-user-defined-types">Declaring objects for user-defined types</h4>
+
+<p>After an object type is defined and installed in the schema, you can use it to
+declare objects in any SQL block. For example, you can use the object type to
+specify the datatype of an attribute, column, variable, bind variable, record
+field, table element, formal parameter, or function result. At run time,
+instances of the object type are created; that is, objects of that type are
+instantiated. Each object can hold different values.</p>
+
+<p>For example, we can declare types <code class="language-plaintext highlighter-rouge">address_typ</code> and <code class="language-plaintext highlighter-rouge">employee_typ</code>:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">CREATE</span> <span class="k">TYPE</span> <span class="n">address_typ</span> <span class="k">AS</span> <span class="k">OBJECT</span> <span class="p">(</span>
+   <span class="n">street</span>          <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">30</span><span class="p">),</span>
+   <span class="n">city</span>            <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">20</span><span class="p">),</span>
+   <span class="k">state</span>           <span class="nb">CHAR</span><span class="p">(</span><span class="mi">2</span><span class="p">),</span>
+   <span class="n">postal_code</span>     <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">6</span><span class="p">));</span>
+
+<span class="k">CREATE</span> <span class="k">TYPE</span> <span class="n">employee_typ</span> <span class="k">AS</span> <span class="k">OBJECT</span> <span class="p">(</span>
+  <span class="n">employee_id</span>       <span class="n">NUMBER</span><span class="p">(</span><span class="mi">6</span><span class="p">),</span>
+  <span class="n">first_name</span>        <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">20</span><span class="p">),</span>
+  <span class="n">last_name</span>         <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">25</span><span class="p">),</span>
+  <span class="n">email</span>             <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">25</span><span class="p">),</span>
+  <span class="n">phone_number</span>      <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">20</span><span class="p">),</span>
+  <span class="n">hire_date</span>         <span class="nb">DATE</span><span class="p">,</span>
+  <span class="n">job_id</span>            <span class="n">VARCHAR2</span><span class="p">(</span><span class="mi">10</span><span class="p">),</span>
+  <span class="n">salary</span>            <span class="n">NUMBER</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span>
+  <span class="n">commission_pct</span>    <span class="n">NUMBER</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span>
+  <span class="n">manager_id</span>        <span class="n">NUMBER</span><span class="p">(</span><span class="mi">6</span><span class="p">),</span>
+  <span class="n">department_id</span>     <span class="n">NUMBER</span><span class="p">(</span><span class="mi">4</span><span class="p">),</span>
+  <span class="n">address</span>           <span class="n">address_typ</span><span class="p">);</span></code></pre></figure>
+
+<p>Using these types, you can instantiate objects as follows:</p>
+
+<figure class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="n">employee_typ</span><span class="p">(</span><span class="mi">315</span><span class="p">,</span> <span class="s1">'Francis'</span><span class="p">,</span> <span class="s1">'Logan'</span><span class="p">,</span> <span class="s1">'FLOGAN'</span><span class="p">,</span>
+    <span class="s1">'555.777.2222'</span><span class="p">,</span> <span class="s1">'01-MAY-04'</span><span class="p">,</span> <span class="s1">'SA_MAN'</span><span class="p">,</span> <span class="mi">11000</span><span class="p">,</span> <span class="p">.</span><span class="mi">15</span><span class="p">,</span> <span class="mi">101</span><span class="p">,</span> <span class="mi">110</span><span class="p">,</span>
+     <span class="n">address_typ</span><span class="p">(</span><span class="s1">'376 Mission'</span><span class="p">,</span> <span class="s1">'San Francisco'</span><span class="p">,</span> <span class="s1">'CA'</span><span class="p">,</span> <span class="s1">'94222'</span><span class="p">))</span></code></pre></figure>
+
+
+          
+
+
+
+
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
+    <div class="section-nav">
+      <div class="left align-right">
+          
+            
+            
+            <a href="/docs/avatica_protobuf_reference.html" class="prev">Previous</a>
+          
+      </div>
+      <div class="right align-left">
+          
+            
+            
+
+            
+            <a href="/docs/model.html" class="next">Next</a>
+          
+      </div>
+    </div>
+    <div class="clear"></div>
+    
+
+        </article>
+      </div>
+
+      <div class="unit one-fifth hide-on-mobiles">
+  <aside>
+    
+    <h4>Overview</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/index.html">Background</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/tutorial.html">Tutorial</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/algebra.html">Algebra</a></li>
+
+
+</ul>
+
+    
+    <h4>Advanced</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/adapter.html">Adapters</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/spatial.html">Spatial</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/stream.html">Streaming</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/materialized_views.html">Materialized Views</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/lattice.html">Lattices</a></li>
+
+
+</ul>
+
+    
+    <h4>Avatica</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_overview.html">Overview</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_roadmap.html">Roadmap</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_json_reference.html">JSON Reference</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/avatica_protobuf_reference.html">Protobuf Reference</a></li>
+
+
+</ul>
+
+    
+    <h4>Reference</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class="current"><a href="/docs/reference.html">SQL language</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/model.html">JSON/YAML models</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/howto.html">HOWTO</a></li>
+
+
+</ul>
+
+    
+    <h4>Meta</h4>
+    
+
+<ul>
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/history.html">History</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/docs/powered_by.html">Powered by Calcite</a></li>
+
+
+  
+  
+  
+  
+
+  
+
+  <li class=""><a href="/javadocAggregate">API</a></li>
+
+
+</ul>
+
+    
+  </aside>
+</div>
+
+
+      <div class="clear"></div>
+
+    </div>
+  </section>
+
+
+  <footer role="contentinfo">
+  <div id="poweredby">
+    <a href="http://www.apache.org/">
+      <span class="sr-only">Apache</span>
+      <img src="/img/feather.png" width="190" height="77" alt="Apache Logo"></a>
+  </div>
+  <div id="copyright">
+  <p>The contents of this website are Copyright © 2022
+     <a href="https://www.apache.org/">Apache Software Foundation</a>
+     under the terms of
+     the <a href="https://www.apache.org/licenses/">
+     Apache License v2</a>. Apache Calcite and its logo are
+     trademarks of the Apache Software Foundation.
+  </p>
+  <p>
+      <a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy Policy</a>
+  </p>
+  </div>
+</footer>
+
+  <script>
+  var anchorForId = function (id) {
+    var anchor = document.createElement("a");
+    anchor.className = "header-link";
+    anchor.href      = "#" + id;
+    anchor.innerHTML = "<span class=\"sr-only\">Permalink</span><i class=\"fa fa-link\"></i>";
+    anchor.title = "Permalink";
+    return anchor;
+  };
+
+  var linkifyAnchors = function (level, containingElement) {
+    var headers = containingElement.getElementsByTagName("h" + level);
+    for (var h = 0; h < headers.length; h++) {
+      var header = headers[h];
+
+      if (typeof header.id !== "undefined" && header.id !== "") {
+        header.appendChild(anchorForId(header.id));
+      }
+    }
+  };
+
+  document.onreadystatechange = function () {
+    if (this.readyState === "complete") {
+      var contentBlock = document.getElementsByClassName("docs")[0] || document.getElementsByClassName("news")[0];
+      if (!contentBlock) {
+        return;
+      }
+      for (var level = 1; level <= 6; level++) {
+        linkifyAnchors(level, contentBlock);
+      }
+    }
+  };
+</script>
+
+
+</body>
+</html>
diff --git a/docs/reference.md b/docs/reference.md
deleted file mode 100644
index 995a4ff3..00000000
--- a/docs/reference.md
+++ /dev/null
@@ -1,3260 +0,0 @@
-
----
-layout: docs
-title: SQL language
-permalink: /docs/reference.html
----
-<!--
-{% comment %}
-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.
-
-The following functions do not need to be documented. They are listed
-here to appease testAllFunctionsAreDocumented:
-
-| Function       | Reason not documented
-|:-------------- |:---------------------
-| CALL           | TODO: document
-| CLASSIFIER()   | Documented with MATCH_RECOGNIZE
-| CONVERT()      | In SqlStdOperatorTable, but not fully implemented
-| CUME_DIST()    | In SqlStdOperatorTable, but not fully implemented
-| DESC           | Described as part of ORDER BY syntax
-| EQUALS         | Documented as an period operator
-| FILTER         | Documented as part of aggregateCall syntax
-| FINAL          | TODO: Document with MATCH_RECOGNIZE
-| FIRST()        | TODO: Documented with MATCH_RECOGNIZE
-| JSON_ARRAYAGG_ABSENT_ON_NULL() | Covered by JSON_ARRAYAGG
-| JSON_OBJECTAGG_NULL_ON_NULL() | Covered by JSON_OBJECTAGG
-| JSON_VALUE_ANY() | Covered by JSON_VALUE
-| LAST()         | TODO: document with MATCH_RECOGNIZE
-| NEW            | TODO: document
-| NEXT()         | Documented with MATCH_RECOGNIZE
-| OVERLAPS       | Documented as a period operator
-| PERCENT_RANK() | In SqlStdOperatorTable, but not fully implemented
-| PRECEDES       | Documented as a period operator
-| PREV()         | Documented with MATCH_RECOGNIZE
-| RUNNING        | TODO: document with MATCH_RECOGNIZE
-| SINGLE_VALUE() | Internal (but should it be?)
-| SUCCEEDS       | Documented as a period operator
-| TABLE          | Documented as part of FROM syntax
-| VARIANCE()     | In SqlStdOperatorTable, but not fully implemented
-{% endcomment %}
--->
-
-<style>
-.container {
-  width: 400px;
-  height: 26px;
-}
-.gray {
-  width: 60px;
-  height: 26px;
-  background: gray;
-  float: left;
-}
-.r15 {
-  width: 40px;
-  height: 6px;
-  background: yellow;
-  margin-top: 4px;
-  margin-left: 10px;
-}
-.r12 {
-  width: 10px;
-  height: 6px;
-  background: yellow;
-  margin-top: 4px;
-  margin-left: 10px;
-}
-.r13 {
-  width: 20px;
-  height: 6px;
-  background: yellow;
-  margin-top: 4px;
-  margin-left: 10px;
-}
-.r2 {
-  width: 2px;
-  height: 6px;
-  background: yellow;
-  margin-top: 4px;
-  margin-left: 20px;
-}
-.r24 {
-  width: 20px;
-  height: 6px;
-  background: yellow;
-  margin-top: 4px;
-  margin-left: 20px;
-}
-.r35 {
-  width: 20px;
-  height: 6px;
-  background: yellow;
-  margin-top: 4px;
-  margin-left: 30px;
-}
-</style>
-
-The page describes the SQL dialect recognized by Calcite's default SQL parser.
-
-## Grammar
-
-SQL grammar in [BNF](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form)-like
-form.
-
-{% highlight sql %}
-statement:
-      setStatement
-  |   resetStatement
-  |   explain
-  |   describe
-  |   insert
-  |   update
-  |   merge
-  |   delete
-  |   query
-
-statementList:
-      statement [ ';' statement ]* [ ';' ]
-
-setStatement:
-      [ ALTER { SYSTEM | SESSION } ] SET identifier '=' expression
-
-resetStatement:
-      [ ALTER { SYSTEM | SESSION } ] RESET identifier
-  |   [ ALTER { SYSTEM | SESSION } ] RESET ALL
-
-explain:
-      EXPLAIN PLAN
-      [ WITH TYPE | WITH IMPLEMENTATION | WITHOUT IMPLEMENTATION ]
-      [ EXCLUDING ATTRIBUTES | INCLUDING [ ALL ] ATTRIBUTES ]
-      [ AS JSON | AS XML | AS DOT ]
-      FOR { query | insert | update | merge | delete }
-
-describe:
-      DESCRIBE DATABASE databaseName
-  |   DESCRIBE CATALOG [ databaseName . ] catalogName
-  |   DESCRIBE SCHEMA [ [ databaseName . ] catalogName ] . schemaName
-  |   DESCRIBE [ TABLE ] [ [ [ databaseName . ] catalogName . ] schemaName . ] tableName [ columnName ]
-  |   DESCRIBE [ STATEMENT ] { query | insert | update | merge | delete }
-
-insert:
-      { INSERT | UPSERT } INTO tablePrimary
-      [ '(' column [, column ]* ')' ]
-      query
-
-update:
-      UPDATE tablePrimary
-      SET assign [, assign ]*
-      [ WHERE booleanExpression ]
-
-assign:
-      identifier '=' expression
-
-merge:
-      MERGE INTO tablePrimary [ [ AS ] alias ]
-      USING tablePrimary
-      ON booleanExpression
-      [ WHEN MATCHED THEN UPDATE SET assign [, assign ]* ]
-      [ WHEN NOT MATCHED THEN INSERT VALUES '(' value [ , value ]* ')' ]
-
-delete:
-      DELETE FROM tablePrimary [ [ AS ] alias ]
-      [ WHERE booleanExpression ]
-
-query:
-      values
-  |   WITH withItem [ , withItem ]* query
-  |   {
-          select
-      |   selectWithoutFrom
-      |   query UNION [ ALL | DISTINCT ] query
-      |   query EXCEPT [ ALL | DISTINCT ] query
-      |   query MINUS [ ALL | DISTINCT ] query
-      |   query INTERSECT [ ALL | DISTINCT ] query
-      }
-      [ ORDER BY orderItem [, orderItem ]* ]
-      [ LIMIT { [ start, ] count | ALL } ]
-      [ OFFSET start { ROW | ROWS } ]
-      [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
-
-withItem:
-      name
-      [ '(' column [, column ]* ')' ]
-      AS '(' query ')'
-
-orderItem:
-      expression [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]
-
-select:
-      SELECT [ hintComment ] [ STREAM ] [ ALL | DISTINCT ]
-          { * | projectItem [, projectItem ]* }
-      FROM tableExpression
-      [ WHERE booleanExpression ]
-      [ GROUP BY [ ALL | DISTINCT ] { groupItem [, groupItem ]* } ]
-      [ HAVING booleanExpression ]
-      [ WINDOW windowName AS windowSpec [, windowName AS windowSpec ]* ]
-
-selectWithoutFrom:
-      SELECT [ ALL | DISTINCT ]
-          { * | projectItem [, projectItem ]* }
-
-projectItem:
-      expression [ [ AS ] columnAlias ]
-  |   tableAlias . *
-
-tableExpression:
-      tableReference [, tableReference ]*
-  |   tableExpression [ NATURAL ] [ { LEFT | RIGHT | FULL } [ OUTER ] ] JOIN tableExpression [ joinCondition ]
-  |   tableExpression CROSS JOIN tableExpression
-  |   tableExpression [ CROSS | OUTER ] APPLY tableExpression
-
-joinCondition:
-      ON booleanExpression
-  |   USING '(' column [, column ]* ')'
-
-tableReference:
-      tablePrimary
-      [ FOR SYSTEM_TIME AS OF expression ]
-      [ pivot ]
-      [ unpivot ]
-      [ matchRecognize ]
-      [ [ AS ] alias [ '(' columnAlias [, columnAlias ]* ')' ] ]
-
-tablePrimary:
-      [ [ catalogName . ] schemaName . ] tableName
-      '(' TABLE [ [ catalogName . ] schemaName . ] tableName ')'
-  |   tablePrimary [ hintComment ] [ EXTEND ] '(' columnDecl [, columnDecl ]* ')'
-  |   [ LATERAL ] '(' query ')'
-  |   UNNEST '(' expression ')' [ WITH ORDINALITY ]
-  |   [ LATERAL ] TABLE '(' [ SPECIFIC ] functionName '(' expression [, expression ]* ')' ')'
-
-columnDecl:
-      column type [ NOT NULL ]
-
-hint:
-      hintName
-  |   hintName '(' hintOptions ')'
-
-hintOptions:
-      hintKVOption [, hintKVOption ]*
-  |   optionName [, optionName ]*
-  |   optionValue [, optionValue ]*
-
-hintKVOption:
-      optionName '=' stringLiteral
-  |   stringLiteral '=' stringLiteral
-
-optionValue:
-      stringLiteral
-  |   numericLiteral
-
-columnOrList:
-      column
-  |   '(' column [, column ]* ')'
-
-exprOrList:
-      expr
-  |   '(' expr [, expr ]* ')'
-
-pivot:
-      PIVOT '('
-      pivotAgg [, pivotAgg ]*
-      FOR pivotList
-      IN '(' pivotExpr [, pivotExpr ]* ')'
-      ')'
-
-pivotAgg:
-      agg '(' [ ALL | DISTINCT ] value [, value ]* ')'
-      [ [ AS ] alias ]
-
-pivotList:
-      columnOrList
-
-pivotExpr:
-      exprOrList [ [ AS ] alias ]
-
-unpivot:
-      UNPIVOT [ INCLUDING NULLS | EXCLUDING NULLS ] '('
-      unpivotMeasureList
-      FOR unpivotAxisList
-      IN '(' unpivotValue [, unpivotValue ]* ')'
-      ')'
-
-unpivotMeasureList:
-      columnOrList
-
-unpivotAxisList:
-      columnOrList
-
-unpivotValue:
-      column [ AS literal ]
-  |   '(' column [, column ]* ')' [ AS '(' literal [, literal ]* ')' ]
-
-values:
-      VALUES expression [, expression ]*
-
-groupItem:
-      expression
-  |   '(' ')'
-  |   '(' expression [, expression ]* ')'
-  |   CUBE '(' expression [, expression ]* ')'
-  |   ROLLUP '(' expression [, expression ]* ')'
-  |   GROUPING SETS '(' groupItem [, groupItem ]* ')'
-
-window:
-      windowName
-  |   windowSpec
-
-windowSpec:
-      '('
-      [ windowName ]
-      [ ORDER BY orderItem [, orderItem ]* ]
-      [ PARTITION BY expression [, expression ]* ]
-      [
-          RANGE numericOrIntervalExpression { PRECEDING | FOLLOWING }
-      |   ROWS numericExpression { PRECEDING | FOLLOWING }
-      ]
-      ')'
-{% endhighlight %}
-
-In *insert*, if the INSERT or UPSERT statement does not specify a
-list of target columns, the query must have the same number of
-columns as the target table, except in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#isInsertSubsetColumnsAllowed--).
-
-In *merge*, at least one of the WHEN MATCHED and WHEN NOT MATCHED clauses must
-be present.
-
-*tablePrimary* may only contain an EXTEND clause in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#allowExtend--);
-in those same conformance levels, any *column* in *insert* may be replaced by
-*columnDecl*, which has a similar effect to including it in an EXTEND clause.
-
-In *orderItem*, if *expression* is a positive integer *n*, it denotes
-the <em>n</em>th item in the SELECT clause.
-
-In *query*, *count* and *start* may each be either an unsigned integer literal
-or a dynamic parameter whose value is an integer.
-
-An aggregate query is a query that contains a GROUP BY or a HAVING
-clause, or aggregate functions in the SELECT clause. In the SELECT,
-HAVING and ORDER BY clauses of an aggregate query, all expressions
-must be constant within the current group (that is, grouping constants
-as defined by the GROUP BY clause, or constants), or aggregate
-functions, or a combination of constants and aggregate
-functions. Aggregate and grouping functions may only appear in an
-aggregate query, and only in a SELECT, HAVING or ORDER BY clause.
-
-A scalar sub-query is a sub-query used as an expression.
-If the sub-query returns no rows, the value is NULL; if it
-returns more than one row, it is an error.
-
-IN, EXISTS, UNIQUE and scalar sub-queries can occur
-in any place where an expression can occur (such as the SELECT clause,
-WHERE clause, ON clause of a JOIN, or as an argument to an aggregate
-function).
-
-An IN, EXISTS, UNIQUE or scalar sub-query may be correlated; that is, it
-may refer to tables in the FROM clause of an enclosing query.
-
-GROUP BY DISTINCT removes duplicate grouping sets (for example,
-"GROUP BY DISTINCT GROUPING SETS ((a), (a, b), (a))" is equivalent to
-"GROUP BY GROUPING SETS ((a), (a, b))");
-GROUP BY ALL is equivalent to GROUP BY.
-
-*selectWithoutFrom* is equivalent to VALUES,
-but is not standard SQL and is only allowed in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#isFromRequired--).
-
-MINUS is equivalent to EXCEPT,
-but is not standard SQL and is only allowed in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#isMinusAllowed--).
-
-CROSS APPLY and OUTER APPLY are only allowed in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#isApplyAllowed--).
-
-"LIMIT start, count" is equivalent to "LIMIT count OFFSET start"
-but is only allowed in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#isLimitStartCountAllowed--).
-
-"OFFSET start" may occur before "LIMIT count" in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#isOffsetLimitAllowed--).
-
-## Keywords
-
-The following is a list of SQL keywords.
-Reserved keywords are **bold**.
-
-{% comment %} start {% endcomment %}
-A,
-**ABS**,
-ABSENT,
-ABSOLUTE,
-ACTION,
-ADA,
-ADD,
-ADMIN,
-AFTER,
-**ALL**,
-**ALLOCATE**,
-**ALLOW**,
-**ALTER**,
-ALWAYS,
-**AND**,
-**ANY**,
-APPLY,
-**ARE**,
-**ARRAY**,
-ARRAY_AGG,
-ARRAY_CONCAT_AGG,
-**ARRAY_MAX_CARDINALITY**,
-**AS**,
-ASC,
-**ASENSITIVE**,
-ASSERTION,
-ASSIGNMENT,
-**ASYMMETRIC**,
-**AT**,
-**ATOMIC**,
-ATTRIBUTE,
-ATTRIBUTES,
-**AUTHORIZATION**,
-**AVG**,
-BEFORE,
-**BEGIN**,
-**BEGIN_FRAME**,
-**BEGIN_PARTITION**,
-BERNOULLI,
-**BETWEEN**,
-**BIGINT**,
-**BINARY**,
-**BIT**,
-**BLOB**,
-**BOOLEAN**,
-**BOTH**,
-BREADTH,
-**BY**,
-C,
-**CALL**,
-**CALLED**,
-**CARDINALITY**,
-CASCADE,
-**CASCADED**,
-**CASE**,
-**CAST**,
-CATALOG,
-CATALOG_NAME,
-**CEIL**,
-**CEILING**,
-CENTURY,
-CHAIN,
-**CHAR**,
-**CHARACTER**,
-CHARACTERISTICS,
-CHARACTERS,
-**CHARACTER_LENGTH**,
-CHARACTER_SET_CATALOG,
-CHARACTER_SET_NAME,
-CHARACTER_SET_SCHEMA,
-**CHAR_LENGTH**,
-**CHECK**,
-**CLASSIFIER**,
-CLASS_ORIGIN,
-**CLOB**,
-**CLOSE**,
-**COALESCE**,
-COBOL,
-**COLLATE**,
-COLLATION,
-COLLATION_CATALOG,
-COLLATION_NAME,
-COLLATION_SCHEMA,
-**COLLECT**,
-**COLUMN**,
-COLUMN_NAME,
-COMMAND_FUNCTION,
-COMMAND_FUNCTION_CODE,
-**COMMIT**,
-COMMITTED,
-**CONDITION**,
-CONDITIONAL,
-CONDITION_NUMBER,
-**CONNECT**,
-CONNECTION,
-CONNECTION_NAME,
-**CONSTRAINT**,
-CONSTRAINTS,
-CONSTRAINT_CATALOG,
-CONSTRAINT_NAME,
-CONSTRAINT_SCHEMA,
-CONSTRUCTOR,
-**CONTAINS**,
-CONTINUE,
-**CONVERT**,
-**CORR**,
-**CORRESPONDING**,
-**COUNT**,
-**COVAR_POP**,
-**COVAR_SAMP**,
-**CREATE**,
-**CROSS**,
-**CUBE**,
-**CUME_DIST**,
-**CURRENT**,
-**CURRENT_CATALOG**,
-**CURRENT_DATE**,
-**CURRENT_DEFAULT_TRANSFORM_GROUP**,
-**CURRENT_PATH**,
-**CURRENT_ROLE**,
-**CURRENT_ROW**,
-**CURRENT_SCHEMA**,
-**CURRENT_TIME**,
-**CURRENT_TIMESTAMP**,
-**CURRENT_TRANSFORM_GROUP_FOR_TYPE**,
-**CURRENT_USER**,
-**CURSOR**,
-CURSOR_NAME,
-**CYCLE**,
-DATA,
-DATABASE,
-**DATE**,
-DATETIME_INTERVAL_CODE,
-DATETIME_INTERVAL_PRECISION,
-**DAY**,
-DAYS,
-**DEALLOCATE**,
-**DEC**,
-DECADE,
-**DECIMAL**,
-**DECLARE**,
-**DEFAULT**,
-DEFAULTS,
-DEFERRABLE,
-DEFERRED,
-**DEFINE**,
-DEFINED,
-DEFINER,
-DEGREE,
-**DELETE**,
-**DENSE_RANK**,
-DEPTH,
-**DEREF**,
-DERIVED,
-DESC,
-**DESCRIBE**,
-DESCRIPTION,
-DESCRIPTOR,
-**DETERMINISTIC**,
-DIAGNOSTICS,
-**DISALLOW**,
-**DISCONNECT**,
-DISPATCH,
-**DISTINCT**,
-DOMAIN,
-DOT,
-**DOUBLE**,
-DOW,
-DOY,
-**DROP**,
-**DYNAMIC**,
-DYNAMIC_FUNCTION,
-DYNAMIC_FUNCTION_CODE,
-**EACH**,
-**ELEMENT**,
-**ELSE**,
-**EMPTY**,
-ENCODING,
-**END**,
-**END-EXEC**,
-**END_FRAME**,
-**END_PARTITION**,
-EPOCH,
-**EQUALS**,
-ERROR,
-**ESCAPE**,
-**EVERY**,
-**EXCEPT**,
-EXCEPTION,
-EXCLUDE,
-EXCLUDING,
-**EXEC**,
-**EXECUTE**,
-**EXISTS**,
-**EXP**,
-**EXPLAIN**,
-**EXTEND**,
-**EXTERNAL**,
-**EXTRACT**,
-**FALSE**,
-**FETCH**,
-**FILTER**,
-FINAL,
-FIRST,
-**FIRST_VALUE**,
-**FLOAT**,
-**FLOOR**,
-FOLLOWING,
-**FOR**,
-**FOREIGN**,
-FORMAT,
-FORTRAN,
-FOUND,
-FRAC_SECOND,
-**FRAME_ROW**,
-**FREE**,
-**FROM**,
-**FULL**,
-**FUNCTION**,
-**FUSION**,
-G,
-GENERAL,
-GENERATED,
-GEOMETRY,
-**GET**,
-**GLOBAL**,
-GO,
-GOTO,
-**GRANT**,
-GRANTED,
-**GROUP**,
-**GROUPING**,
-**GROUPS**,
-GROUP_CONCAT,
-**HAVING**,
-HIERARCHY,
-**HOLD**,
-HOP,
-**HOUR**,
-HOURS,
-**IDENTITY**,
-IGNORE,
-ILIKE,
-IMMEDIATE,
-IMMEDIATELY,
-IMPLEMENTATION,
-**IMPORT**,
-**IN**,
-INCLUDE,
-INCLUDING,
-INCREMENT,
-**INDICATOR**,
-**INITIAL**,
-INITIALLY,
-**INNER**,
-**INOUT**,
-INPUT,
-**INSENSITIVE**,
-**INSERT**,
-INSTANCE,
-INSTANTIABLE,
-**INT**,
-**INTEGER**,
-**INTERSECT**,
-**INTERSECTION**,
-**INTERVAL**,
-**INTO**,
-INVOKER,
-**IS**,
-ISODOW,
-ISOLATION,
-ISOYEAR,
-JAVA,
-**JOIN**,
-JSON,
-**JSON_ARRAY**,
-**JSON_ARRAYAGG**,
-**JSON_EXISTS**,
-**JSON_OBJECT**,
-**JSON_OBJECTAGG**,
-**JSON_QUERY**,
-**JSON_VALUE**,
-K,
-KEY,
-KEY_MEMBER,
-KEY_TYPE,
-LABEL,
-**LAG**,
-**LANGUAGE**,
-**LARGE**,
-LAST,
-**LAST_VALUE**,
-**LATERAL**,
-**LEAD**,
-**LEADING**,
-**LEFT**,
-LENGTH,
-LEVEL,
-LIBRARY,
-**LIKE**,
-**LIKE_REGEX**,
-**LIMIT**,
-**LN**,
-**LOCAL**,
-**LOCALTIME**,
-**LOCALTIMESTAMP**,
-LOCATOR,
-**LOWER**,
-M,
-MAP,
-**MATCH**,
-MATCHED,
-**MATCHES**,
-**MATCH_NUMBER**,
-**MATCH_RECOGNIZE**,
-**MAX**,
-MAXVALUE,
-**MEASURES**,
-**MEMBER**,
-**MERGE**,
-MESSAGE_LENGTH,
-MESSAGE_OCTET_LENGTH,
-MESSAGE_TEXT,
-**METHOD**,
-MICROSECOND,
-MILLENNIUM,
-MILLISECOND,
-**MIN**,
-**MINUS**,
-**MINUTE**,
-MINUTES,
-MINVALUE,
-**MOD**,
-**MODIFIES**,
-**MODULE**,
-**MONTH**,
-MONTHS,
-MORE,
-**MULTISET**,
-MUMPS,
-NAME,
-NAMES,
-NANOSECOND,
-**NATIONAL**,
-**NATURAL**,
-**NCHAR**,
-**NCLOB**,
-NESTING,
-**NEW**,
-**NEXT**,
-**NO**,
-**NONE**,
-**NORMALIZE**,
-NORMALIZED,
-**NOT**,
-**NTH_VALUE**,
-**NTILE**,
-**NULL**,
-NULLABLE,
-**NULLIF**,
-NULLS,
-NUMBER,
-**NUMERIC**,
-OBJECT,
-**OCCURRENCES_REGEX**,
-OCTETS,
-**OCTET_LENGTH**,
-**OF**,
-**OFFSET**,
-**OLD**,
-**OMIT**,
-**ON**,
-**ONE**,
-**ONLY**,
-**OPEN**,
-OPTION,
-OPTIONS,
-**OR**,
-**ORDER**,
-ORDERING,
-ORDINALITY,
-OTHERS,
-**OUT**,
-**OUTER**,
-OUTPUT,
-**OVER**,
-**OVERLAPS**,
-**OVERLAY**,
-OVERRIDING,
-PAD,
-**PARAMETER**,
-PARAMETER_MODE,
-PARAMETER_NAME,
-PARAMETER_ORDINAL_POSITION,
-PARAMETER_SPECIFIC_CATALOG,
-PARAMETER_SPECIFIC_NAME,
-PARAMETER_SPECIFIC_SCHEMA,
-PARTIAL,
-**PARTITION**,
-PASCAL,
-PASSING,
-PASSTHROUGH,
-PAST,
-PATH,
-**PATTERN**,
-**PER**,
-**PERCENT**,
-**PERCENTILE_CONT**,
-**PERCENTILE_DISC**,
-**PERCENT_RANK**,
-**PERIOD**,
-**PERMUTE**,
-PIVOT,
-PLACING,
-PLAN,
-PLI,
-**PORTION**,
-**POSITION**,
-**POSITION_REGEX**,
-**POWER**,
-**PRECEDES**,
-PRECEDING,
-**PRECISION**,
-**PREPARE**,
-PRESERVE,
-**PREV**,
-**PRIMARY**,
-PRIOR,
-PRIVILEGES,
-**PROCEDURE**,
-PUBLIC,
-QUARTER,
-**RANGE**,
-**RANK**,
-READ,
-**READS**,
-**REAL**,
-**RECURSIVE**,
-**REF**,
-**REFERENCES**,
-**REFERENCING**,
-**REGR_AVGX**,
-**REGR_AVGY**,
-**REGR_COUNT**,
-**REGR_INTERCEPT**,
-**REGR_R2**,
-**REGR_SLOPE**,
-**REGR_SXX**,
-**REGR_SXY**,
-**REGR_SYY**,
-RELATIVE,
-**RELEASE**,
-REPEATABLE,
-REPLACE,
-**RESET**,
-RESPECT,
-RESTART,
-RESTRICT,
-**RESULT**,
-**RETURN**,
-RETURNED_CARDINALITY,
-RETURNED_LENGTH,
-RETURNED_OCTET_LENGTH,
-RETURNED_SQLSTATE,
-RETURNING,
-**RETURNS**,
-**REVOKE**,
-**RIGHT**,
-RLIKE,
-ROLE,
-**ROLLBACK**,
-**ROLLUP**,
-ROUTINE,
-ROUTINE_CATALOG,
-ROUTINE_NAME,
-ROUTINE_SCHEMA,
-**ROW**,
-**ROWS**,
-ROW_COUNT,
-**ROW_NUMBER**,
-**RUNNING**,
-**SAVEPOINT**,
-SCALAR,
-SCALE,
-SCHEMA,
-SCHEMA_NAME,
-**SCOPE**,
-SCOPE_CATALOGS,
-SCOPE_NAME,
-SCOPE_SCHEMA,
-**SCROLL**,
-**SEARCH**,
-**SECOND**,
-SECONDS,
-SECTION,
-SECURITY,
-**SEEK**,
-**SELECT**,
-SELF,
-**SENSITIVE**,
-SEPARATOR,
-SEQUENCE,
-SERIALIZABLE,
-SERVER,
-SERVER_NAME,
-SESSION,
-**SESSION_USER**,
-**SET**,
-SETS,
-**SHOW**,
-**SIMILAR**,
-SIMPLE,
-SIZE,
-**SKIP**,
-**SMALLINT**,
-**SOME**,
-SOURCE,
-SPACE,
-**SPECIFIC**,
-**SPECIFICTYPE**,
-SPECIFIC_NAME,
-**SQL**,
-**SQLEXCEPTION**,
-**SQLSTATE**,
-**SQLWARNING**,
-SQL_BIGINT,
-SQL_BINARY,
-SQL_BIT,
-SQL_BLOB,
-SQL_BOOLEAN,
-SQL_CHAR,
-SQL_CLOB,
-SQL_DATE,
-SQL_DECIMAL,
-SQL_DOUBLE,
-SQL_FLOAT,
-SQL_INTEGER,
-SQL_INTERVAL_DAY,
-SQL_INTERVAL_DAY_TO_HOUR,
-SQL_INTERVAL_DAY_TO_MINUTE,
-SQL_INTERVAL_DAY_TO_SECOND,
-SQL_INTERVAL_HOUR,
-SQL_INTERVAL_HOUR_TO_MINUTE,
-SQL_INTERVAL_HOUR_TO_SECOND,
-SQL_INTERVAL_MINUTE,
-SQL_INTERVAL_MINUTE_TO_SECOND,
-SQL_INTERVAL_MONTH,
-SQL_INTERVAL_SECOND,
-SQL_INTERVAL_YEAR,
-SQL_INTERVAL_YEAR_TO_MONTH,
-SQL_LONGVARBINARY,
-SQL_LONGVARCHAR,
-SQL_LONGVARNCHAR,
-SQL_NCHAR,
-SQL_NCLOB,
-SQL_NUMERIC,
-SQL_NVARCHAR,
-SQL_REAL,
-SQL_SMALLINT,
-SQL_TIME,
-SQL_TIMESTAMP,
-SQL_TINYINT,
-SQL_TSI_DAY,
-SQL_TSI_FRAC_SECOND,
-SQL_TSI_HOUR,
-SQL_TSI_MICROSECOND,
-SQL_TSI_MINUTE,
-SQL_TSI_MONTH,
-SQL_TSI_QUARTER,
-SQL_TSI_SECOND,
-SQL_TSI_WEEK,
-SQL_TSI_YEAR,
-SQL_VARBINARY,
-SQL_VARCHAR,
-**SQRT**,
-**START**,
-STATE,
-STATEMENT,
-**STATIC**,
-**STDDEV_POP**,
-**STDDEV_SAMP**,
-**STREAM**,
-STRING_AGG,
-STRUCTURE,
-STYLE,
-SUBCLASS_ORIGIN,
-**SUBMULTISET**,
-**SUBSET**,
-SUBSTITUTE,
-**SUBSTRING**,
-**SUBSTRING_REGEX**,
-**SUCCEEDS**,
-**SUM**,
-**SYMMETRIC**,
-**SYSTEM**,
-**SYSTEM_TIME**,
-**SYSTEM_USER**,
-**TABLE**,
-**TABLESAMPLE**,
-TABLE_NAME,
-TEMPORARY,
-**THEN**,
-TIES,
-**TIME**,
-**TIMESTAMP**,
-TIMESTAMPADD,
-TIMESTAMPDIFF,
-**TIMEZONE_HOUR**,
-**TIMEZONE_MINUTE**,
-**TINYINT**,
-**TO**,
-TOP_LEVEL_COUNT,
-**TRAILING**,
-TRANSACTION,
-TRANSACTIONS_ACTIVE,
-TRANSACTIONS_COMMITTED,
-TRANSACTIONS_ROLLED_BACK,
-TRANSFORM,
-TRANSFORMS,
-**TRANSLATE**,
-**TRANSLATE_REGEX**,
-**TRANSLATION**,
-**TREAT**,
-**TRIGGER**,
-TRIGGER_CATALOG,
-TRIGGER_NAME,
-TRIGGER_SCHEMA,
-**TRIM**,
-**TRIM_ARRAY**,
-**TRUE**,
-**TRUNCATE**,
-TUMBLE,
-TYPE,
-**UESCAPE**,
-UNBOUNDED,
-UNCOMMITTED,
-UNCONDITIONAL,
-UNDER,
-**UNION**,
-**UNIQUE**,
-**UNKNOWN**,
-UNNAMED,
-**UNNEST**,
-UNPIVOT,
-**UPDATE**,
-**UPPER**,
-**UPSERT**,
-USAGE,
-**USER**,
-USER_DEFINED_TYPE_CATALOG,
-USER_DEFINED_TYPE_CODE,
-USER_DEFINED_TYPE_NAME,
-USER_DEFINED_TYPE_SCHEMA,
-**USING**,
-UTF16,
-UTF32,
-UTF8,
-**VALUE**,
-**VALUES**,
-**VALUE_OF**,
-**VARBINARY**,
-**VARCHAR**,
-**VARYING**,
-**VAR_POP**,
-**VAR_SAMP**,
-VERSION,
-**VERSIONING**,
-VIEW,
-WEEK,
-**WHEN**,
-**WHENEVER**,
-**WHERE**,
-**WIDTH_BUCKET**,
-**WINDOW**,
-**WITH**,
-**WITHIN**,
-**WITHOUT**,
-WORK,
-WRAPPER,
-WRITE,
-XML,
-**YEAR**,
-YEARS,
-ZONE.
-{% comment %} end {% endcomment %}
-
-## Identifiers
-
-Identifiers are the names of tables, columns and other metadata
-elements used in a SQL query.
-
-Unquoted identifiers, such as emp, must start with a letter and can
-only contain letters, digits, and underscores. They are implicitly
-converted to upper case.
-
-Quoted identifiers, such as `"Employee Name"`, start and end with
-double quotes.  They may contain virtually any character, including
-spaces and other punctuation.  If you wish to include a double quote
-in an identifier, use another double quote to escape it, like this:
-`"An employee called ""Fred""."`.
-
-In Calcite, matching identifiers to the name of the referenced object is
-case-sensitive.  But remember that unquoted identifiers are implicitly
-converted to upper case before matching, and if the object it refers
-to was created using an unquoted identifier for its name, then its
-name will have been converted to upper case also.
-
-## Data types
-
-### Scalar types
-
-| Data type   | Description               | Range and example literals
-|:----------- |:------------------------- |:--------------------------
-| BOOLEAN     | Logical values            | Values: TRUE, FALSE, UNKNOWN
-| TINYINT     | 1 byte signed integer     | Range is -128 to 127
-| SMALLINT    | 2 byte signed integer     | Range is -32768 to 32767
-| INTEGER, INT | 4 byte signed integer    | Range is -2147483648 to 2147483647
-| BIGINT      | 8 byte signed integer     | Range is -9223372036854775808 to 9223372036854775807
-| DECIMAL(p, s) | Fixed point             | Example: 123.45 is a DECIMAL(5, 2) value.
-| NUMERIC     | Fixed point               |
-| REAL, FLOAT | 4 byte floating point     | 6 decimal digits precision
-| DOUBLE      | 8 byte floating point     | 15 decimal digits precision
-| CHAR(n), CHARACTER(n) | Fixed-width character string | 'Hello', '' (empty string), _latin1'Hello', n'Hello', _UTF16'Hello', 'Hello' 'there' (literal split into multiple parts)
-| VARCHAR(n), CHARACTER VARYING(n) | Variable-length character string | As CHAR(n)
-| BINARY(n)   | Fixed-width binary string | x'45F0AB', x'' (empty binary string), x'AB' 'CD' (multi-part binary string literal)
-| VARBINARY(n), BINARY VARYING(n) | Variable-length binary string | As BINARY(n)
-| DATE        | Date                      | Example: DATE '1969-07-20'
-| TIME        | Time of day               | Example: TIME '20:17:40'
-| TIMESTAMP [ WITHOUT TIME ZONE ] | Date and time | Example: TIMESTAMP '1969-07-20 20:17:40'
-| TIMESTAMP WITH LOCAL TIME ZONE | Date and time with local time zone | Example: TIMESTAMP '1969-07-20 20:17:40 America/Los Angeles'
-| TIMESTAMP WITH TIME ZONE | Date and time with time zone | Example: TIMESTAMP '1969-07-20 20:17:40 America/Los Angeles'
-| INTERVAL timeUnit [ TO timeUnit ] | Date time interval | Examples: INTERVAL '1-5' YEAR TO MONTH, INTERVAL '45' DAY, INTERVAL '1 2:34:56.789' DAY TO SECOND
-| GEOMETRY | Geometry | Examples: ST_GeomFromText('POINT (30 10)')
-
-Where:
-
-{% highlight sql %}
-timeUnit:
-  MILLENNIUM | CENTURY | DECADE | YEAR | QUARTER | MONTH | WEEK | DOY | DOW | DAY | HOUR | MINUTE | SECOND | EPOCH
-{% endhighlight %}
-
-Note:
-
-* DATE, TIME and TIMESTAMP have no time zone. For those types, there is not
-  even an implicit time zone, such as UTC (as in Java) or the local time zone.
-  It is left to the user or application to supply a time zone. In turn,
-  TIMESTAMP WITH LOCAL TIME ZONE does not store the time zone internally, but
-  it will rely on the supplied time zone to provide correct semantics.
-* GEOMETRY is allowed only in certain
-  [conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#allowGeometry--).
-* Interval literals may only use time units
-  YEAR, MONTH, DAY, HOUR, MINUTE and SECOND. In certain
-  [conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#allowPluralTimeUnits--),
-  we also allow their plurals, YEARS, MONTHS, DAYS, HOURS, MINUTES and SECONDS.
-
-### Non-scalar types
-
-| Type     | Description                | Example literals
-|:-------- |:---------------------------|:---------------
-| ANY      | The union of all types |
-| UNKNOWN  | A value of an unknown type; used as a placeholder |
-| ROW      | Row with 1 or more columns | Example: Row(f0 int null, f1 varchar)
-| MAP      | Collection of keys mapped to values |
-| MULTISET | Unordered collection that may contain duplicates | Example: int multiset
-| ARRAY    | Ordered, contiguous collection that may contain duplicates | Example: varchar(10) array
-| CURSOR   | Cursor over the result of executing a query |
-
-Note:
-
-* Every `ROW` column type can have an optional [ NULL | NOT NULL ] suffix
-  to indicate if this column type is nullable, default is not nullable.
-
-### Spatial types
-
-Spatial data is represented as character strings encoded as
-[well-known text (WKT)](https://en.wikipedia.org/wiki/Well-known_text)
-or binary strings encoded as
-[well-known binary (WKB)](https://en.wikipedia.org/wiki/Well-known_binary).
-
-Where you would use a literal, apply the `ST_GeomFromText` function,
-for example `ST_GeomFromText('POINT (30 10)')`.
-
-| Data type          | Type code | Examples in WKT
-|:-------------------|:--------- |:---------------------
-| GEOMETRY           |  0 | generalization of Point, Curve, Surface, GEOMETRYCOLLECTION
-| POINT              |  1 | <code>ST_GeomFromText(&#8203;'POINT (30 10)')</code> is a point in 2D space; <code>ST_GeomFromText(&#8203;'POINT Z(30 10 2)')</code> is point in 3D space
-| CURVE              | 13 | generalization of LINESTRING
-| LINESTRING         |  2 | <code>ST_GeomFromText(&#8203;'LINESTRING (30 10, 10 30, 40 40)')</code>
-| SURFACE            | 14 | generalization of Polygon, PolyhedralSurface
-| POLYGON            |  3 | <code>ST_GeomFromText(&#8203;'POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))')</code> is a pentagon; <code>ST_GeomFromText(&#8203;'POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))')</code> is a pentagon with a quadrilateral hole
-| POLYHEDRALSURFACE  | 15 |
-| GEOMETRYCOLLECTION |  7 | a collection of zero or more GEOMETRY instances; a generalization of MULTIPOINT, MULTILINESTRING, MULTIPOLYGON
-| MULTIPOINT         |  4 | <code>ST_GeomFromText(&#8203;'MULTIPOINT ((10 40), (40 30), (20 20), (30 10))')</code> is equivalent to <code>ST_GeomFromText(&#8203;'MULTIPOINT (10 40, 40 30, 20 20, 30 10)')</code>
-| MULTICURVE         |  - | generalization of MULTILINESTRING
-| MULTILINESTRING    |  5 | <code>ST_GeomFromText(&#8203;'MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))')</code>
-| MULTISURFACE       |  - | generalization of MULTIPOLYGON
-| MULTIPOLYGON       |  6 | <code>ST_GeomFromText(&#8203;'MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))')</code>
-
-## Operators and functions
-
-### Operator precedence
-
-The operator precedence and associativity, highest to lowest.
-
-| Operator                                          | Associativity
-|:------------------------------------------------- |:-------------
-| .                                                 | left
-| ::                                                | left
-| [ ] (collection element)                          | left
-| + - (unary plus, minus)                           | right
-| * / % &#124;&#124;                                | left
-| + -                                               | left
-| BETWEEN, IN, LIKE, SIMILAR, OVERLAPS, CONTAINS etc. | -
-| < > = <= >= <> != <=>                             | left
-| IS NULL, IS FALSE, IS NOT TRUE etc.               | -
-| NOT                                               | right
-| AND                                               | left
-| OR                                                | left
-
-Note that `::`,`<=>` is dialect-specific, but is shown in this table for
-completeness.
-
-### Comparison operators
-
-| Operator syntax                                   | Description
-|:------------------------------------------------- |:-----------
-| value1 = value2                                   | Equals
-| value1 <> value2                                  | Not equal
-| value1 != value2                                  | Not equal (only available at some conformance levels)
-| value1 > value2                                   | Greater than
-| value1 >= value2                                  | Greater than or equal
-| value1 < value2                                   | Less than
-| value1 <= value2                                  | Less than or equal
-| value1 <=> value2                                 | Whether two values are equal, treating null values as the same
-| value IS NULL                                     | Whether *value* is null
-| value IS NOT NULL                                 | Whether *value* is not null
-| value1 IS DISTINCT FROM value2                    | Whether two values are not equal, treating null values as the same
-| value1 IS NOT DISTINCT FROM value2                | Whether two values are equal, treating null values as the same
-| value1 BETWEEN value2 AND value3                  | Whether *value1* is greater than or equal to *value2* and less than or equal to *value3*
-| value1 NOT BETWEEN value2 AND value3              | Whether *value1* is less than *value2* or greater than *value3*
-| string1 LIKE string2 [ ESCAPE string3 ]           | Whether *string1* matches pattern *string2*
-| string1 NOT LIKE string2 [ ESCAPE string3 ]       | Whether *string1* does not match pattern *string2*
-| string1 SIMILAR TO string2 [ ESCAPE string3 ]     | Whether *string1* matches regular expression *string2*
-| string1 NOT SIMILAR TO string2 [ ESCAPE string3 ] | Whether *string1* does not match regular expression *string2*
-| value IN (value [, value]*)                       | Whether *value* is equal to a value in a list
-| value NOT IN (value [, value]*)                   | Whether *value* is not equal to every value in a list
-| value IN (sub-query)                              | Whether *value* is equal to a row returned by *sub-query*
-| value NOT IN (sub-query)                          | Whether *value* is not equal to every row returned by *sub-query*
-| value comparison SOME (sub-query)                 | Whether *value* *comparison* at least one row returned by *sub-query*
-| value comparison ANY (sub-query)                  | Synonym for `SOME`
-| value comparison ALL (sub-query)                  | Whether *value* *comparison* every row returned by *sub-query*
-| EXISTS (sub-query)                                | Whether *sub-query* returns at least one row
-| UNIQUE (sub-query)                                | Whether the rows returned by *sub-query* are unique (ignoring null values)
-
-{% highlight sql %}
-comp:
-      =
-  |   <>
-  |   >
-  |   >=
-  |   <
-  |   <=
-  |   <=>
-{% endhighlight %}
-
-### Logical operators
-
-| Operator syntax        | Description
-|:---------------------- |:-----------
-| boolean1 OR boolean2   | Whether *boolean1* is TRUE or *boolean2* is TRUE
-| boolean1 AND boolean2  | Whether *boolean1* and *boolean2* are both TRUE
-| NOT boolean            | Whether *boolean* is not TRUE; returns UNKNOWN if *boolean* is UNKNOWN
-| boolean IS FALSE       | Whether *boolean* is FALSE; returns FALSE if *boolean* is UNKNOWN
-| boolean IS NOT FALSE   | Whether *boolean* is not FALSE; returns TRUE if *boolean* is UNKNOWN
-| boolean IS TRUE        | Whether *boolean* is TRUE; returns FALSE if *boolean* is UNKNOWN
-| boolean IS NOT TRUE    | Whether *boolean* is not TRUE; returns TRUE if *boolean* is UNKNOWN
-| boolean IS UNKNOWN     | Whether *boolean* is UNKNOWN
-| boolean IS NOT UNKNOWN | Whether *boolean* is not UNKNOWN
-
-### Arithmetic operators and functions
-
-| Operator syntax           | Description
-|:------------------------- |:-----------
-| + numeric                 | Returns *numeric*
-| - numeric                 | Returns negative *numeric*
-| numeric1 + numeric2       | Returns *numeric1* plus *numeric2*
-| numeric1 - numeric2       | Returns *numeric1* minus *numeric2*
-| numeric1 * numeric2       | Returns *numeric1* multiplied by *numeric2*
-| numeric1 / numeric2       | Returns *numeric1* divided by *numeric2*
-| numeric1 % numeric2       | As *MOD(numeric1, numeric2)* (only in certain [conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#isPercentRemainderAllowed--))
-| POWER(numeric1, numeric2) | Returns *numeric1* raised to the power of *numeric2*
-| ABS(numeric)              | Returns the absolute value of *numeric*
-| MOD(numeric1, numeric2)   | Returns the remainder (modulus) of *numeric1* divided by *numeric2*. The result is negative only if *numeric1* is negative
-| SQRT(numeric)             | Returns the square root of *numeric*
-| LN(numeric)               | Returns the natural logarithm (base *e*) of *numeric*
-| LOG10(numeric)            | Returns the base 10 logarithm of *numeric*
-| EXP(numeric)              | Returns *e* raised to the power of *numeric*
-| CEIL(numeric)             | Rounds *numeric* up, returning the smallest integer that is greater than or equal to *numeric*
-| FLOOR(numeric)            | Rounds *numeric* down, returning the largest integer that is less than or equal to *numeric*
-| RAND([seed])              | Generates a random double between 0 and 1 inclusive, optionally initializing the random number generator with *seed*
-| RAND_INTEGER([seed, ] numeric) | Generates a random integer between 0 and *numeric* - 1 inclusive, optionally initializing the random number generator with *seed*
-| ACOS(numeric)             | Returns the arc cosine of *numeric*
-| ASIN(numeric)             | Returns the arc sine of *numeric*
-| ATAN(numeric)             | Returns the arc tangent of *numeric*
-| ATAN2(numeric, numeric)   | Returns the arc tangent of the *numeric* coordinates
-| CBRT(numeric)             | Returns the cube root of *numeric*
-| COS(numeric)              | Returns the cosine of *numeric*
-| COT(numeric)              | Returns the cotangent of *numeric*
-| DEGREES(numeric)          | Converts *numeric* from radians to degrees
-| PI()                      | Returns a value that is closer than any other value to *pi*
-| RADIANS(numeric)          | Converts *numeric* from degrees to radians
-| ROUND(numeric1 [, numeric2]) | Rounds *numeric1* to optionally *numeric2* (if not specified 0) places right to the decimal point
-| SIGN(numeric)             | Returns the signum of *numeric*
-| SIN(numeric)              | Returns the sine of *numeric*
-| TAN(numeric)              | Returns the tangent of *numeric*
-| TRUNCATE(numeric1 [, numeric2]) | Truncates *numeric1* to optionally *numeric2* (if not specified 0) places right to the decimal point
-
-### Character string operators and functions
-
-| Operator syntax            | Description
-|:-------------------------- |:-----------
-| string &#124;&#124; string | Concatenates two character strings
-| CHAR_LENGTH(string)        | Returns the number of characters in a character string
-| CHARACTER_LENGTH(string)   | As CHAR_LENGTH(*string*)
-| UPPER(string)              | Returns a character string converted to upper case
-| LOWER(string)              | Returns a character string converted to lower case
-| POSITION(string1 IN string2) | Returns the position of the first occurrence of *string1* in *string2*
-| POSITION(string1 IN string2 FROM integer) | Returns the position of the first occurrence of *string1* in *string2* starting at a given point (not standard SQL)
-| TRIM( { BOTH &#124; LEADING &#124; TRAILING } string1 FROM string2) | Removes the longest string containing only the characters in *string1* from the start/end/both ends of *string1*
-| OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ]) | Replaces a substring of *string1* with *string2*
-| SUBSTRING(string FROM integer)  | Returns a substring of a character string starting at a given point
-| SUBSTRING(string FROM integer FOR integer) | Returns a substring of a character string starting at a given point with a given length
-| INITCAP(string)            | Returns *string* with the first letter of each word converter to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.
-
-Not implemented:
-
-* SUBSTRING(string FROM regexp FOR regexp)
-
-### Binary string operators and functions
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| binary &#124;&#124; binary | Concatenates two binary strings
-| OCTET_LENGTH(binary) | Returns the number of bytes in *binary*
-| POSITION(binary1 IN binary2) | Returns the position of the first occurrence of *binary1* in *binary2*
-| POSITION(binary1 IN binary2 FROM integer) | Returns the position of the first occurrence of *binary1* in *binary2* starting at a given point (not standard SQL)
-| OVERLAY(binary1 PLACING binary2 FROM integer [ FOR integer2 ]) | Replaces a substring of *binary1* with *binary2*
-| SUBSTRING(binary FROM integer) | Returns a substring of *binary* starting at a given point
-| SUBSTRING(binary FROM integer FOR integer) | Returns a substring of *binary* starting at a given point with a given length
-
-### Date/time functions
-
-| Operator syntax           | Description
-|:------------------------- |:-----------
-| LOCALTIME                 | Returns the current date and time in the session time zone in a value of datatype TIME
-| LOCALTIME(precision)      | Returns the current date and time in the session time zone in a value of datatype TIME, with *precision* digits of precision
-| LOCALTIMESTAMP            | Returns the current date and time in the session time zone in a value of datatype TIMESTAMP
-| LOCALTIMESTAMP(precision) | Returns the current date and time in the session time zone in a value of datatype TIMESTAMP, with *precision* digits of precision
-| CURRENT_TIME              | Returns the current time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE
-| CURRENT_DATE              | Returns the current date in the session time zone, in a value of datatype DATE
-| CURRENT_TIMESTAMP         | Returns the current date and time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE
-| EXTRACT(timeUnit FROM datetime) | Extracts and returns the value of a specified datetime field from a datetime value expression
-| FLOOR(datetime TO timeUnit) | Rounds *datetime* down to *timeUnit*
-| CEIL(datetime TO timeUnit) | Rounds *datetime* up to *timeUnit*
-| YEAR(date)                | Equivalent to `EXTRACT(YEAR FROM date)`. Returns an integer.
-| QUARTER(date)             | Equivalent to `EXTRACT(QUARTER FROM date)`. Returns an integer between 1 and 4.
-| MONTH(date)               | Equivalent to `EXTRACT(MONTH FROM date)`. Returns an integer between 1 and 12.
-| WEEK(date)                | Equivalent to `EXTRACT(WEEK FROM date)`. Returns an integer between 1 and 53.
-| DAYOFYEAR(date)           | Equivalent to `EXTRACT(DOY FROM date)`. Returns an integer between 1 and 366.
-| DAYOFMONTH(date)          | Equivalent to `EXTRACT(DAY FROM date)`. Returns an integer between 1 and 31.
-| DAYOFWEEK(date)           | Equivalent to `EXTRACT(DOW FROM date)`. Returns an integer between 1 and 7.
-| HOUR(date)                | Equivalent to `EXTRACT(HOUR FROM date)`. Returns an integer between 0 and 23.
-| MINUTE(date)              | Equivalent to `EXTRACT(MINUTE FROM date)`. Returns an integer between 0 and 59.
-| SECOND(date)              | Equivalent to `EXTRACT(SECOND FROM date)`. Returns an integer between 0 and 59.
-| TIMESTAMPADD(timeUnit, integer, datetime) | Returns *datetime* with an interval of (signed) *integer* *timeUnit*s added. Equivalent to `datetime + INTERVAL 'integer' timeUnit`
-| TIMESTAMPDIFF(timeUnit, datetime, datetime2) | Returns the (signed) number of *timeUnit* intervals between *datetime* and *datetime2*. Equivalent to `(datetime2 - datetime) timeUnit`
-| LAST_DAY(date)            | Returns the date of the last day of the month in a value of datatype DATE; For example, it returns DATE'2020-02-29' for both DATE'2020-02-10' and TIMESTAMP'2020-02-10 10:10:10'
-
-Calls to niladic functions such as `CURRENT_DATE` do not accept parentheses in
-standard SQL. Calls with parentheses, such as `CURRENT_DATE()` are accepted in certain
-[conformance levels]({{ site.apiRoot }}/org/apache/calcite/sql/validate/SqlConformance.html#allowNiladicParentheses--).
-
-Not implemented:
-
-* CEIL(interval)
-* FLOOR(interval)
-* \+ interval
-* \- interval
-* interval + interval
-* interval - interval
-* interval / interval
-
-### System functions
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| USER            | Equivalent to CURRENT_USER
-| CURRENT_USER    | User name of current execution context
-| SESSION_USER    | Session user name
-| SYSTEM_USER     | Returns the name of the current data store user as identified by the operating system
-| CURRENT_PATH    | Returns a character string representing the current lookup scope for references to user-defined routines and types
-| CURRENT_ROLE    | Returns the current active role
-| CURRENT_SCHEMA  | Returns the current schema
-
-### Conditional functions and operators
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| CASE value<br/>WHEN value1 [, value11 ]* THEN result1<br/>[ WHEN valueN [, valueN1 ]* THEN resultN ]*<br/>[ ELSE resultZ ]<br/> END | Simple case
-| CASE<br/>WHEN condition1 THEN result1<br/>[ WHEN conditionN THEN resultN ]*<br/>[ ELSE resultZ ]<br/>END | Searched case
-| NULLIF(value, value) | Returns NULL if the values are the same.<br/><br/>For example, <code>NULLIF(5, 5)</code> returns NULL; <code>NULLIF(5, 0)</code> returns 5.
-| COALESCE(value, value [, value ]*) | Provides a value if the first value is null.<br/><br/>For example, <code>COALESCE(NULL, 5)</code> returns 5.
-
-### Type conversion
-
-Generally an expression cannot contain values of different datatypes. For example, an expression cannot multiply 5 by 10 and then add 'JULIAN'.
-However, Calcite supports both implicit and explicit conversion of values from one datatype to another.
-
-#### Implicit and Explicit Type Conversion
-Calcite recommends that you specify explicit conversions, rather than rely on implicit or automatic conversions, for these reasons:
-
-* SQL statements are easier to understand when you use explicit datatype conversion functions.
-* Implicit datatype conversion can have a negative impact on performance, especially if the datatype of a column value is converted to that of a constant rather than the other way around.
-* Implicit conversion depends on the context in which it occurs and may not work the same way in every case. For example, implicit conversion from a datetime value to a VARCHAR value may return an unexpected format.
-
-Algorithms for implicit conversion are subject to change across Calcite releases. Behavior of explicit conversions is more predictable.
-
-#### Explicit Type Conversion
-
-| Operator syntax | Description
-|:--------------- | :----------
-| CAST(value AS type) | Converts a value to a given type.
-
-Supported data types syntax:
-
-{% highlight sql %}
-type:
-      typeName
-      [ collectionsTypeName ]*
-
-typeName:
-      sqlTypeName
-  |   rowTypeName
-  |   compoundIdentifier
-
-sqlTypeName:
-      char [ precision ] [ charSet ]
-  |   varchar [ precision ] [ charSet ]
-  |   DATE
-  |   time
-  |   timestamp
-  |   GEOMETRY
-  |   decimal [ precision [, scale] ]
-  |   BOOLEAN
-  |   integer
-  |   BINARY [ precision ]
-  |   varbinary [ precision ]
-  |   TINYINT
-  |   SMALLINT
-  |   BIGINT
-  |   REAL
-  |   double
-  |   FLOAT
-  |   ANY [ precision [, scale] ]
-
-collectionsTypeName:
-      ARRAY | MULTISET
-
-rowTypeName:
-      ROW '('
-      fieldName1 fieldType1 [ NULL | NOT NULL ]
-      [ , fieldName2 fieldType2 [ NULL | NOT NULL ] ]*
-      ')'
-
-char:
-      CHARACTER | CHAR
-
-varchar:
-      char VARYING | VARCHAR
-
-decimal:
-      DECIMAL | DEC | NUMERIC
-
-integer:
-      INTEGER | INT
-
-varbinary:
-      BINARY VARYING | VARBINARY
-
-double:
-      DOUBLE [ PRECISION ]
-
-time:
-      TIME [ precision ] [ timeZone ]
-
-timestamp:
-      TIMESTAMP [ precision ] [ timeZone ]
-
-charSet:
-      CHARACTER SET charSetName
-
-timeZone:
-      WITHOUT TIME ZONE
-  |   WITH LOCAL TIME ZONE
-{% endhighlight %}
-
-#### Implicit Type Conversion
-
-Calcite automatically converts a value from one datatype to another
-when such a conversion makes sense. The table below is a matrix of
-Calcite type conversions. The table shows all possible conversions,
-without regard to the context in which it is made. The rules governing
-these details follow the table.
-
-| FROM - TO           | NULL | BOOLEAN | TINYINT | SMALLINT | INT | BIGINT | DECIMAL | FLOAT or REAL | DOUBLE | INTERVAL | DATE | TIME | TIMESTAMP | CHAR or VARCHAR | BINARY or VARBINARY
-|:------------------- |:---- |:------- |:------- |:-------- |:--- |:------ |:------- |:------------- |:------ |:-------- |:---- |:---- |:--------- |:--------------- |:-----------
-| NULL                | i    | i       | i       | i        | i   | i      | i       | i             | i      | i        | i    | i    | i         | i               | i
-| BOOLEAN             | x    | i       | e       | e        | e   | e      | e       | e             | e      | x        | x    | x    | x         | i               | x
-| TINYINT             | x    | e       | i       | i        | i   | i      | i       | i             | i      | e        | x    | x    | e         | i               | x
-| SMALLINT            | x    | e       | i       | i        | i   | i      | i       | i             | i      | e        | x    | x    | e         | i               | x
-| INT                 | x    | e       | i       | i        | i   | i      | i       | i             | i      | e        | x    | x    | e         | i               | x
-| BIGINT              | x    | e       | i       | i        | i   | i      | i       | i             | i      | e        | x    | x    | e         | i               | x
-| DECIMAL             | x    | e       | i       | i        | i   | i      | i       | i             | i      | e        | x    | x    | e         | i               | x
-| FLOAT/REAL          | x    | e       | i       | i        | i   | i      | i       | i             | i      | x        | x    | x    | e         | i               | x
-| DOUBLE              | x    | e       | i       | i        | i   | i      | i       | i             | i      | x        | x    | x    | e         | i               | x
-| INTERVAL            | x    | x       | e       | e        | e   | e      | e       | x             | x      | i        | x    | x    | x         | e               | x
-| DATE                | x    | x       | x       | x        | x   | x      | x       | x             | x      | x        | i    | x    | i         | i               | x
-| TIME                | x    | x       | x       | x        | x   | x      | x       | x             | x      | x        | x    | i    | e         | i               | x
-| TIMESTAMP           | x    | x       | e       | e        | e   | e      | e       | e             | e      | x        | i    | e    | i         | i               | x
-| CHAR or VARCHAR     | x    | e       | i       | i        | i   | i      | i       | i             | i      | i        | i    | i    | i         | i               | i
-| BINARY or VARBINARY | x    | x       | x       | x        | x   | x      | x       | x             | x      | x        | e    | e    | e         | i               | i
-
-i: implicit cast / e: explicit cast / x: not allowed
-
-##### Conversion Contexts and Strategies
-
-* Set operation (`UNION`, `EXCEPT`, `INTERSECT`): compare every branch
-  row data type and find the common type of each fields pair;
-* Binary arithmetic expression (`+`, `-`, `&`, `^`, `/`, `%`): promote
-  string operand to data type of the other numeric operand;
-* Binary comparison (`=`, `<`, `<=`, `<>`, `>`, `>=`):
-  if operands are `STRING` and `TIMESTAMP`, promote to `TIMESTAMP`;
-  make `1 = true` and `0 = false` always evaluate to `TRUE`;
-  if there is numeric type operand, find common type for both operands.
-* `IN` sub-query: compare type of LHS and RHS, and find the common type;
-  if it is struct type, find wider type for every field;
-* `IN` expression list: compare every expression to find the common type;
-* `CASE WHEN` expression or `COALESCE`: find the common wider type of the `THEN`
-  and `ELSE` operands;
-* Character + `INTERVAL` or character - `INTERVAL`: promote character to
-  `TIMESTAMP`;
-* Built-in function: look up the type families registered in the checker,
-  find the family default type if checker rules allow it;
-* User-defined function (UDF): coerce based on the declared argument types
-  of the `eval()` method;
-* `INSERT` and `UPDATE`: coerce a source field to counterpart target table
-  field's type if the two fields differ with type name or precision(scale).
-
-Note:
-
-Implicit type coercion of following cases are ignored:
-
-* One of the type is `ANY`;
-* Type coercion within `CHARACTER` types are always ignored,
-  i.e. from `CHAR(20)` to `VARCHAR(30)`;
-* Type coercion from a numeric to another with higher precedence is ignored,
-  i.e. from `INT` to `LONG`.
-
-##### Strategies for Finding Common Type
-
-* If the operator has expected data types, just take them as the
-  desired one. (e.g. the UDF would have `eval()` method which has
-  reflection argument types);
-* If there is no expected data type but the data type families are
-  registered, try to coerce the arguments to the family's default data
-  type, i.e. the String family will have a `VARCHAR` type;
-* If neither expected data type nor families are specified, try to
-  find the tightest common type of the node types, i.e. `INTEGER` and
-  `DOUBLE` will return `DOUBLE`, the numeric precision does not lose
-  for this case;
-* If no tightest common type is found, try to find a wider type,
-  i.e. `VARCHAR` and `INTEGER` will return `INTEGER`,
-  we allow some precision loss when widening decimal to fractional,
-  or promote to `VARCHAR` type.
-
-### Value constructors
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| ROW (value [, value ]*)  | Creates a row from a list of values.
-| (value [, value ]* )     | Creates a row from a list of values.
-| row '[' index ']'        | Returns the element at a particular location in a row (1-based index).
-| row '[' name ']'         | Returns the element of a row with a particular name.
-| map '[' key ']'     | Returns the element of a map with a particular key.
-| array '[' index ']' | Returns the element at a particular location in an array (1-based index).
-| ARRAY '[' value [, value ]* ']' | Creates an array from a list of values.
-| MAP '[' key, value [, key, value ]* ']' | Creates a map from a list of key-value pairs.
-
-### Collection functions
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| ELEMENT(value)  | Returns the sole element of an array or multiset; null if the collection is empty; throws if it has more than one element.
-| CARDINALITY(value) | Returns the number of elements in an array or multiset.
-| value MEMBER OF multiset | Returns whether the *value* is a member of *multiset*.
-| multiset IS A SET | Whether *multiset* is a set (has no duplicates).
-| multiset IS NOT A SET | Whether *multiset* is not a set (has duplicates).
-| multiset IS EMPTY | Whether *multiset* contains zero elements.
-| multiset IS NOT EMPTY | Whether *multiset* contains one or more elements.
-| multiset SUBMULTISET OF multiset2 | Whether *multiset* is a submultiset of *multiset2*.
-| multiset NOT SUBMULTISET OF multiset2 | Whether *multiset* is not a submultiset of *multiset2*.
-| multiset MULTISET UNION [ ALL &#124; DISTINCT ] multiset2 | Returns the union *multiset* and *multiset2*, eliminating duplicates if DISTINCT is specified (ALL is the default).
-| multiset MULTISET INTERSECT [ ALL &#124; DISTINCT ] multiset2 | Returns the intersection of *multiset* and *multiset2*, eliminating duplicates if DISTINCT is specified (ALL is the default).
-| multiset MULTISET EXCEPT [ ALL &#124; DISTINCT ] multiset2 | Returns the difference of *multiset* and *multiset2*, eliminating duplicates if DISTINCT is specified (ALL is the default).
-
-See also: the UNNEST relational operator converts a collection to a relation.
-
-### Period predicates
-
-<table>
-  <tr>
-    <th>Operator syntax</th>
-    <th>Description</th>
-  </tr>
-  <tr>
-    <td>period1 CONTAINS datetime</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r15"></div><div class="r2"></div></div>
-      </div>
-    </td>
-  </tr>
-  <tr>
-    <td>period1 CONTAINS period2</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r15"></div><div class="r24"></div></div>
-        <div class="gray"><div class="r15"></div><div class="r13"></div></div>
-        <div class="gray"><div class="r15"></div><div class="r35"></div></div>
-        <div class="gray"><div class="r15"></div><div class="r15"></div></div>
-      </div>
-    </td>
-  </tr>
-  <tr>
-    <td>period1 OVERLAPS period2</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r15"></div><div class="r24"></div></div>
-        <div class="gray"><div class="r15"></div><div class="r13"></div></div>
-        <div class="gray"><div class="r15"></div><div class="r35"></div></div>
-        <div class="gray"><div class="r15"></div><div class="r15"></div></div>
-        <div class="gray"><div class="r24"></div><div class="r15"></div></div>
-        <div class="gray"><div class="r13"></div><div class="r15"></div></div>
-        <div class="gray"><div class="r35"></div><div class="r15"></div></div>
-        <div class="gray"><div class="r24"></div><div class="r13"></div></div>
-        <div class="gray"><div class="r13"></div><div class="r24"></div></div>
-      </div>
-    </td>
-  </tr>
-  <tr>
-    <td>period1 EQUALS period2</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r15"></div><div class="r15"></div></div>
-      </div>
-    </td>
-  </tr>
-  <tr>
-    <td>period1 PRECEDES period2</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r12"></div><div class="r35"></div></div>
-        <div class="gray"><div class="r13"></div><div class="r35"></div></div>
-      </div>
-    </td>
-  </tr>
-  <tr>
-    <td>period1 IMMEDIATELY PRECEDES period2</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r13"></div><div class="r35"></div></div>
-      </div>
-    </td>
-  </tr>
-  <tr>
-    <td>period1 SUCCEEDS period2</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r35"></div><div class="r12"></div></div>
-        <div class="gray"><div class="r35"></div><div class="r13"></div></div>
-      </div>
-    </td>
-  </tr>
-  <tr>
-    <td>period1 IMMEDIATELY SUCCEEDS period2</td>
-    <td>
-      <div class="container">
-        <div class="gray"><div class="r35"></div><div class="r13"></div></div>
-      </div>
-    </td>
-  </tr>
-</table>
-
-Where *period1* and *period2* are period expressions:
-
-{% highlight sql %}
-period:
-      (datetime, datetime)
-  |   (datetime, interval)
-  |   PERIOD (datetime, datetime)
-  |   PERIOD (datetime, interval)
-{% endhighlight %}
-
-### JDBC function escape
-
-#### Numeric
-
-| Operator syntax                   | Description
-|:--------------------------------- |:-----------
-| {fn ABS(numeric)}                 | Returns the absolute value of *numeric*
-| {fn ACOS(numeric)}                | Returns the arc cosine of *numeric*
-| {fn ASIN(numeric)}                | Returns the arc sine of *numeric*
-| {fn ATAN(numeric)}                | Returns the arc tangent of *numeric*
-| {fn ATAN2(numeric, numeric)}      | Returns the arc tangent of the *numeric* coordinates
-| {fn CBRT(numeric)}                | Returns the cube root of *numeric*
-| {fn CEILING(numeric)}             | Rounds *numeric* up, and returns the smallest number that is greater than or equal to *numeric*
-| {fn COS(numeric)}                 | Returns the cosine of *numeric*
-| {fn COT(numeric)}                 | Returns the cotangent of *numeric*
-| {fn DEGREES(numeric)}             | Converts *numeric* from radians to degrees
-| {fn EXP(numeric)}                 | Returns *e* raised to the power of *numeric*
-| {fn FLOOR(numeric)}               | Rounds *numeric* down, and returns the largest number that is less than or equal to *numeric*
-| {fn LOG(numeric)}                 | Returns the natural logarithm (base *e*) of *numeric*
-| {fn LOG10(numeric)}               | Returns the base-10 logarithm of *numeric*
-| {fn MOD(numeric1, numeric2)}      | Returns the remainder (modulus) of *numeric1* divided by *numeric2*. The result is negative only if *numeric1* is negative
-| {fn PI()}                         | Returns a value that is closer than any other value to *pi*
-| {fn POWER(numeric1, numeric2)}    | Returns *numeric1* raised to the power of *numeric2*
-| {fn RADIANS(numeric)}             | Converts *numeric* from degrees to radians
-| {fn RAND(numeric)}                | Returns a random double using *numeric* as the seed value
-| {fn ROUND(numeric1, numeric2)}    | Rounds *numeric1* to *numeric2* places right to the decimal point
-| {fn SIGN(numeric)}                | Returns the signum of *numeric*
-| {fn SIN(numeric)}                 | Returns the sine of *numeric*
-| {fn SQRT(numeric)}                | Returns the square root of *numeric*
-| {fn TAN(numeric)}                 | Returns the tangent of *numeric*
-| {fn TRUNCATE(numeric1, numeric2)} | Truncates *numeric1* to *numeric2* places right to the decimal point
-
-#### String
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| {fn ASCII(string)} | Returns the ASCII code of the first character of *string*; if the first character is a non-ASCII character, returns its Unicode code point; returns 0 if *string* is empty
-| {fn CHAR(integer)} | Returns the character whose ASCII code is *integer* % 256, or null if *integer* &lt; 0
-| {fn CONCAT(character, character)} | Returns the concatenation of character strings
-| {fn INSERT(string1, start, length, string2)} | Inserts *string2* into a slot in *string1*
-| {fn LCASE(string)} | Returns a string in which all alphabetic characters in *string* have been converted to lower case
-| {fn LENGTH(string)} | Returns the number of characters in a string
-| {fn LOCATE(string1, string2 [, integer])} | Returns the position in *string2* of the first occurrence of *string1*. Searches from the beginning of *string2*, unless *integer* is specified.
-| {fn LEFT(string, length)} | Returns the leftmost *length* characters from *string*
-| {fn LTRIM(string)} | Returns *string* with leading space characters removed
-| {fn REPLACE(string, search, replacement)} | Returns a string in which all the occurrences of *search* in *string* are replaced with *replacement*; if *replacement* is the empty string, the occurrences of *search* are removed
-| {fn REVERSE(string)} | Returns *string* with the order of the characters reversed
-| {fn RIGHT(string, length)} | Returns the rightmost *length* characters from *string*
-| {fn RTRIM(string)} | Returns *string* with trailing space characters removed
-| {fn SUBSTRING(string, offset, length)} | Returns a character string that consists of *length* characters from *string* starting at the *offset* position
-| {fn UCASE(string)} | Returns a string in which all alphabetic characters in *string* have been converted to upper case
-
-#### Date/time
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| {fn CURDATE()}  | Equivalent to `CURRENT_DATE`
-| {fn CURTIME()}  | Equivalent to `LOCALTIME`
-| {fn NOW()}      | Equivalent to `LOCALTIMESTAMP`
-| {fn YEAR(date)} | Equivalent to `EXTRACT(YEAR FROM date)`. Returns an integer.
-| {fn QUARTER(date)} | Equivalent to `EXTRACT(QUARTER FROM date)`. Returns an integer between 1 and 4.
-| {fn MONTH(date)} | Equivalent to `EXTRACT(MONTH FROM date)`. Returns an integer between 1 and 12.
-| {fn WEEK(date)} | Equivalent to `EXTRACT(WEEK FROM date)`. Returns an integer between 1 and 53.
-| {fn DAYOFYEAR(date)} | Equivalent to `EXTRACT(DOY FROM date)`. Returns an integer between 1 and 366.
-| {fn DAYOFMONTH(date)} | Equivalent to `EXTRACT(DAY FROM date)`. Returns an integer between 1 and 31.
-| {fn DAYOFWEEK(date)} | Equivalent to `EXTRACT(DOW FROM date)`. Returns an integer between 1 and 7.
-| {fn HOUR(date)} | Equivalent to `EXTRACT(HOUR FROM date)`. Returns an integer between 0 and 23.
-| {fn MINUTE(date)} | Equivalent to `EXTRACT(MINUTE FROM date)`. Returns an integer between 0 and 59.
-| {fn SECOND(date)} | Equivalent to `EXTRACT(SECOND FROM date)`. Returns an integer between 0 and 59.
-| {fn TIMESTAMPADD(timeUnit, count, datetime)} | Adds an interval of *count* *timeUnit*s to a datetime
-| {fn TIMESTAMPDIFF(timeUnit, timestamp1, timestamp2)} | Subtracts *timestamp1* from *timestamp2* and returns the result in *timeUnit*s
-
-
-#### System
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| {fn DATABASE()} | Equivalent to `CURRENT_CATALOG`
-| {fn IFNULL(value1, value2)} | Returns value2 if value1 is null
-| {fn USER()}     | Equivalent to `CURRENT_USER`
-
-#### Conversion
-
-| Operator syntax | Description
-|:--------------- |:-----------
-| {fn CONVERT(value, type)} | Cast *value* into *type*
-
-### Aggregate functions
-
-Syntax:
-
-{% highlight sql %}
-aggregateCall:
-      agg '(' [ ALL | DISTINCT ] value [, value ]* ')'
-      [ WITHIN DISTINCT '(' expression [, expression ]* ')' ]
-      [ WITHIN GROUP '(' ORDER BY orderItem [, orderItem ]* ')' ]
-      [ FILTER '(' WHERE condition ')' ]
-  |   agg '(' '*' ')' [ FILTER (WHERE condition) ]
-{% endhighlight %}
-
-where *agg* is one of the operators in the following table, or a user-defined
-aggregate function.
-
-If `FILTER` is present, the aggregate function only considers rows for which
-*condition* evaluates to TRUE.
-
-If `DISTINCT` is present, duplicate argument values are eliminated before being
-passed to the aggregate function.
-
-If `WITHIN DISTINCT` is present, argument values are made distinct within
-each value of specified keys before being passed to the aggregate function.
-
-If `WITHIN GROUP` is present, the aggregate function sorts the input rows
-according to the `ORDER BY` clause inside `WITHIN GROUP` before aggregating
-values. `WITHIN GROUP` is only allowed for hypothetical set functions (`RANK`,
-`DENSE_RANK`, `PERCENT_RANK` and `CUME_DIST`), inverse distribution functions
-(`PERCENTILE_CONT` and `PERCENTILE_DISC`) and collection functions (`COLLECT`
-and `LISTAGG`).
-
-| Operator syntax                    | Description
-|:---------------------------------- |:-----------
-| ANY_VALUE( [ ALL &#124; DISTINCT ] value)     | Returns one of the values of *value* across all input values; this is NOT specified in the SQL standard
-| APPROX_COUNT_DISTINCT(value [, value ]*)      | Returns the approximate number of distinct values of *value*; the database is allowed to use an approximation but is not required to
-| AVG( [ ALL &#124; DISTINCT ] numeric)         | Returns the average (arithmetic mean) of *numeric* across all input values
-| BIT_AND( [ ALL &#124; DISTINCT ] value)       | Returns the bitwise AND of all non-null input values, or null if none; integer and binary types are supported
-| BIT_OR( [ ALL &#124; DISTINCT ] value)        | Returns the bitwise OR of all non-null input values, or null if none; integer and binary types are supported
-| BIT_XOR( [ ALL &#124; DISTINCT ] value)       | Returns the bitwise XOR of all non-null input values, or null if none; integer and binary types are supported
-| COLLECT( [ ALL &#124; DISTINCT ] value)       | Returns a multiset of the values
-| COUNT(*)                                      | Returns the number of input rows
-| COUNT( [ ALL &#124; DISTINCT ] value [, value ]*) | Returns the number of input rows for which *value* is not null (wholly not null if *value* is composite)
-| COVAR_POP(numeric1, numeric2)                 | Returns the population covariance of the pair (*numeric1*, *numeric2*) across all input values
-| COVAR_SAMP(numeric1, numeric2)                | Returns the sample covariance of the pair (*numeric1*, *numeric2*) across all input values
-| EVERY(condition)                              | Returns TRUE if all of the values of *condition* are TRUE
-| FUSION(multiset)                              | Returns the multiset union of *multiset* across all input values
-| INTERSECTION(multiset)                        | Returns the multiset intersection of *multiset* across all input values
-| LISTAGG( [ ALL &#124; DISTINCT ] value [, separator]) | Returns values concatenated into a string, delimited by separator (default ',')
-| MAX( [ ALL &#124; DISTINCT ] value)           | Returns the maximum value of *value* across all input values
-| MIN( [ ALL &#124; DISTINCT ] value)           | Returns the minimum value of *value* across all input values
-| MODE(value)                                   | Returns the most frequent value of *value* across all input values
-| REGR_COUNT(numeric1, numeric2)                | Returns the number of rows where both dependent and independent expressions are not null
-| REGR_SXX(numeric1, numeric2)                  | Returns the sum of squares of the dependent expression in a linear regression model
-| REGR_SYY(numeric1, numeric2)                  | Returns the sum of squares of the independent expression in a linear regression model
-| SOME(condition)                               | Returns TRUE if one or more of the values of *condition* is TRUE
-| STDDEV( [ ALL &#124; DISTINCT ] numeric)      | Synonym for `STDDEV_SAMP`
-| STDDEV_POP( [ ALL &#124; DISTINCT ] numeric)  | Returns the population standard deviation of *numeric* across all input values
-| STDDEV_SAMP( [ ALL &#124; DISTINCT ] numeric) | Returns the sample standard deviation of *numeric* across all input values
-| SUM( [ ALL &#124; DISTINCT ] numeric)         | Returns the sum of *numeric* across all input values
-| VAR_POP( [ ALL &#124; DISTINCT ] value)       | Returns the population variance (square of the population standard deviation) of *numeric* across all input values
-| VAR_SAMP( [ ALL &#124; DISTINCT ] numeric)    | Returns the sample variance (square of the sample standard deviation) of *numeric* across all input values
-
-Not implemented:
-
-* REGR_AVGX(numeric1, numeric2)
-* REGR_AVGY(numeric1, numeric2)
-* REGR_INTERCEPT(numeric1, numeric2)
-* REGR_R2(numeric1, numeric2)
-* REGR_SLOPE(numeric1, numeric2)
-* REGR_SXY(numeric1, numeric2)
-
-#### Ordered-Set Aggregate Functions
-
-The syntax is as for *aggregateCall*, except that `WITHIN GROUP` is
-required.
-
-In the following:
-
-* *fraction* is a numeric literal between 0 and 1, inclusive, and
-  represents a percentage
-
-| Operator syntax                    | Description
-|:---------------------------------- |:-----------
-| PERCENTILE_CONT(fraction) WITHIN GROUP (ORDER BY orderItem) | Returns a percentile based on a continuous distribution of the column values, interpolating between adjacent input items if needed
-| PERCENTILE_DISC(fraction) WITHIN GROUP (ORDER BY orderItem [, orderItem ]*) | Returns a percentile based on a discrete distribution of the column values returning the first input value whose position in the ordering equals or exceeds the specified fraction
-
-### Window functions
-
-Syntax:
-
-{% highlight sql %}
-windowedAggregateCall:
-      agg '(' [ ALL | DISTINCT ] value [, value ]* ')'
-      [ RESPECT NULLS | IGNORE NULLS ]
-      [ WITHIN GROUP '(' ORDER BY orderItem [, orderItem ]* ')' ]
-      [ FILTER '(' WHERE condition ')' ]
-      OVER window
-  |   agg '(' '*' ')'
-      [ FILTER  '(' WHERE condition ')' ]
-      OVER window
-{% endhighlight %}
-
-where *agg* is one of the operators in the following table, or a user-defined
-aggregate function.
-
-`DISTINCT`, `FILTER` and `WITHIN GROUP` are as described for aggregate
-functions.
-
-| Operator syntax                           | Description
-|:----------------------------------------- |:-----------
-| COUNT(value [, value ]*) OVER window      | Returns the number of rows in *window* for which *value* is not null (wholly not null if *value* is composite)
-| COUNT(*) OVER window                      | Returns the number of rows in *window*
-| AVG(numeric) OVER window                  | Returns the average (arithmetic mean) of *numeric* across all values in *window*
-| SUM(numeric) OVER window                  | Returns the sum of *numeric* across all values in *window*
-| MAX(value) OVER window                    | Returns the maximum value of *value* across all values in *window*
-| MIN(value) OVER window                    | Returns the minimum value of *value* across all values in *window*
-| RANK() OVER window                        | Returns the rank of the current row with gaps; same as ROW_NUMBER of its first peer
-| DENSE_RANK() OVER window                  | Returns the rank of the current row without gaps; this function counts peer groups
-| ROW_NUMBER() OVER window                  | Returns the number of the current row within its partition, counting from 1
-| FIRST_VALUE(value) OVER window            | Returns *value* evaluated at the row that is the first row of the window frame
-| LAST_VALUE(value) OVER window             | Returns *value* evaluated at the row that is the last row of the window frame
-| LEAD(value, offset, default) OVER window  | Returns *value* evaluated at the row that is *offset* rows after the current row within the partition; if there is no such row, instead returns *default*. Both *offset* and *default* are evaluated with respect to the current row. If omitted, *offset* defaults to 1 and *default* to NULL
-| LAG(value, offset, default) OVER window   | Returns *value* evaluated at the row that is *offset* rows before the current row within the partition; if there is no such row, instead returns *default*. Both *offset* and *default* are evaluated with respect to the current row. If omitted, *offset* defaults to 1 and *default* to NULL
-| NTH_VALUE(value, nth) OVER window         | Returns *value* evaluated at the row that is the *n*th row of the window frame
-| NTILE(value) OVER window                  | Returns an integer ranging from 1 to *value*, dividing the partition as equally as possible
-
-Note:
-
-* You may specify null treatment (`IGNORE NULLS`, `RESPECT NULLS`) for
-  `FIRST_VALUE`, `LAST_VALUE`, `NTH_VALUE`, `LEAD` and `LAG` functions. The
-  syntax handled by the parser, but only `RESPECT NULLS` is implemented at
-  runtime.
-
-Not implemented:
-
-* COUNT(DISTINCT value [, value ]*) OVER window
-* APPROX_COUNT_DISTINCT(value [, value ]*) OVER window
-* PERCENT_RANK(value) OVER window
-* CUME_DIST(value) OVER window
-
-### Grouping functions
-
-| Operator syntax      | Description
-|:-------------------- |:-----------
-| GROUPING(expression [, expression ]*) | Returns a bit vector of the given grouping expressions
-| GROUP_ID()           | Returns an integer that uniquely identifies the combination of grouping keys
-| GROUPING_ID(expression [, expression ]*) | Synonym for `GROUPING`
-
-### DESCRIPTOR
-
-| Operator syntax      | Description
-|:-------------------- |:-----------
-| DESCRIPTOR(name [, name ]*) | DESCRIPTOR appears as an argument in a function to indicate a list of names. The interpretation of names is left to the function.
-
-### Table functions
-
-Table functions occur in the `FROM` clause.
-
-Table functions may have generic table parameters (i.e., no row type is
-declared when the table function is created), and the row type of the result
- might depend on the row type(s) of the input tables.
-Besides, input tables are classified by three characteristics.
-The first characteristic is semantics. Input tables have either row semantics
-or set semantics, as follows:
-* Row semantics means that the result of the table function depends on a
-row-by-row basis.
-* Set semantics means that the outcome of the function depends on how the
-data is partitioned.
-
-The second characteristic, which applies only to input tables with
-set semantics, is whether the table function can generate a result row
-even if the input table is empty.
-* If the table function can generate a result row on empty input,
-the table is said to be "keep when empty".
-* The alternative is called "prune when empty", meaning that
-the result would be pruned out if the input table is empty.
-
-The third characteristic is whether the input table supports
-pass-through columns or not. Pass-through columns is a mechanism
-enabling the table function to copy every column of an input row
-into columns of an output row.
-
-The input tables with set semantics may be partitioned on one or more columns.
-The input tables with set semantics may be ordered on one or more columns.
-
-Note:
-* The input tables with row semantics may not be partitioned or ordered.
-* A polymorphic table function may have multiple input tables. However,
-at most one input table could have row semantics.
-
-#### TUMBLE
-
-In streaming queries, TUMBLE assigns a window for each row of a relation based
-on a timestamp column. An assigned window is specified by its beginning and
-ending. All assigned windows have the same length, and that's why tumbling
-sometimes is named as "fixed windowing".
-The first parameter of the TUMBLE table function is a generic table parameter.
-The input table has row semantics and supports pass-through columns.
-
-| Operator syntax      | Description
-|:-------------------- |:-----------
-| TUMBLE(data, DESCRIPTOR(timecol), size [, offset ]) | Indicates a tumbling window of *size* interval for *timecol*, optionally aligned at *offset*.
-
-Here is an example:
-
-{% highlight sql %}
-SELECT * FROM TABLE(
-  TUMBLE(
-    TABLE orders,
-    DESCRIPTOR(rowtime),
-    INTERVAL '1' MINUTE));
-
--- or with the named params
--- note: the DATA param must be the first
-SELECT * FROM TABLE(
-  TUMBLE(
-    DATA => TABLE orders,
-    TIMECOL => DESCRIPTOR(rowtime),
-    SIZE => INTERVAL '1' MINUTE));
-{% endhighlight %}
-
-applies a tumbling window with a one minute range to rows from the `orders`
-table. `rowtime` is the watermarked column of the `orders` table that informs
-whether data is complete.
-
-#### HOP
-
-In streaming queries, HOP assigns windows that cover rows within the interval of *size* and shifting every *slide* based
-on a timestamp column. Windows assigned could have overlapping so hopping sometime is named as "sliding windowing".
-The first parameter of the HOP table function is a generic table parameter.
-The input table has row semantics and supports pass-through columns.
-
-| Operator syntax      | Description
-|:-------------------- |:-----------
-| HOP(data, DESCRIPTOR(timecol), slide, size [, offset ]) | Indicates a hopping window for *timecol*, covering rows within the interval of *size*, shifting every *slide* and optionally aligned at *offset*.
-
-Here is an example:
-
-{% highlight sql %}
-SELECT * FROM TABLE(
-  HOP(
-    TABLE orders,
-    DESCRIPTOR(rowtime),
-    INTERVAL '2' MINUTE,
-    INTERVAL '5' MINUTE));
-
--- or with the named params
--- note: the DATA param must be the first
-SELECT * FROM TABLE(
-  HOP(
-    DATA => TABLE orders,
-    TIMECOL => DESCRIPTOR(rowtime),
-    SLIDE => INTERVAL '2' MINUTE,
-    SIZE => INTERVAL '5' MINUTE));
-{% endhighlight %}
-
-applies hopping with 5-minute interval size on rows from table `orders`
-and shifting every 2 minutes. `rowtime` is the watermarked column of table
-orders that tells data completeness.
-
-#### SESSION
-
-In streaming queries, SESSION assigns windows that cover rows based on *datetime*. Within a session window, distances
-of rows are less than *interval*. Session window is applied per *key*.
-The first parameter of the SESSION table function is a generic table parameter.
-The input table has set semantics and supports pass-through columns.
-Besides, the SESSION table function would not generate a result row
-if the input table is empty.
-
-| Operator syntax      | Description
-|:-------------------- |:-----------
-| session(data, DESCRIPTOR(timecol), DESCRIPTOR(key), size) | Indicates a session window of *size* interval for *timecol*. Session window is applied per *key*.
-
-Here is an example:
-
-{% highlight sql %}
-SELECT * FROM TABLE(
-  SESSION(
-    TABLE orders PARTITION BY product,
-    DESCRIPTOR(rowtime),
-    INTERVAL '20' MINUTE));
-
--- or with the named params
--- note: the DATA param must be the first
-SELECT * FROM TABLE(
-  SESSION(
-    DATA => TABLE orders PARTITION BY product,
-    TIMECOL => DESCRIPTOR(rowtime),
-    SIZE => INTERVAL '20' MINUTE));
-{% endhighlight %}
-
-applies a session with 20-minute inactive gap on rows from table `orders`.
-`rowtime` is the watermarked column of table orders that tells data
-completeness. Session is applied per product.
-
-**Note**: The `Tumble`, `Hop` and `Session` window table functions assign
-each row in the original table to a window. The output table has all
-the same columns as the original table plus two additional columns `window_start`
-and `window_end`, which represent the start and end of the window interval, respectively.
-
-### Grouped window functions
-**warning**: grouped window functions are deprecated.
-
-Grouped window functions occur in the `GROUP BY` clause and define a key value
-that represents a window containing several rows.
-
-In some window functions, a row may belong to more than one window.
-For example, if a query is grouped using
-`HOP(t, INTERVAL '2' HOUR, INTERVAL '1' HOUR)`, a row with timestamp '10:15:00'
- will occur in both the 10:00 - 11:00 and 11:00 - 12:00 totals.
-
-| Operator syntax      | Description
-|:-------------------- |:-----------
-| HOP(datetime, slide, size [, time ]) | Indicates a hopping window for *datetime*, covering rows within the interval of *size*, shifting every *slide*, and optionally aligned at *time*
-| SESSION(datetime, interval [, time ]) | Indicates a session window of *interval* for *datetime*, optionally aligned at *time*
-| TUMBLE(datetime, interval [, time ]) | Indicates a tumbling window of *interval* for *datetime*, optionally aligned at *time*
-
-### Grouped auxiliary functions
-
-Grouped auxiliary functions allow you to access properties of a window defined
-by a grouped window function.
-
-| Operator syntax      | Description
-|:-------------------- |:-----------
-| HOP_END(expression, slide, size [, time ]) | Returns the value of *expression* at the end of the window defined by a `HOP` function call
-| HOP_START(expression, slide, size [, time ]) | Returns the value of *expression* at the beginning of the window defined by a `HOP` function call
-| SESSION_END(expression, interval [, time]) | Returns the value of *expression* at the end of the window defined by a `SESSION` function call
-| SESSION_START(expression, interval [, time]) | Returns the value of *expression* at the beginning of the window defined by a `SESSION` function call
-| TUMBLE_END(expression, interval [, time ]) | Returns the value of *expression* at the end of the window defined by a `TUMBLE` function call
-| TUMBLE_START(expression, interval [, time ]) | Returns the value of *expression* at the beginning of the window defined by a `TUMBLE` function call
-
-### Spatial functions
-
-In the following:
-
-* *geom* is a GEOMETRY;
-* *geomCollection* is a GEOMETRYCOLLECTION;
-* *point* is a POINT;
-* *lineString* is a LINESTRING;
-* *iMatrix* is a [DE-9IM intersection matrix](https://en.wikipedia.org/wiki/DE-9IM);
-* *distance*, *tolerance*, *segmentLengthFraction*, *offsetDistance* are of type double;
-* *dimension*, *quadSegs*, *srid*, *zoom* are of type integer;
-* *layerType* is a character string;
-* *gml* is a character string containing [Geography Markup Language (GML)](https://en.wikipedia.org/wiki/Geography_Markup_Language);
-* *wkt* is a character string containing [well-known text (WKT)](https://en.wikipedia.org/wiki/Well-known_text);
-* *wkb* is a binary string containing [well-known binary (WKB)](https://en.wikipedia.org/wiki/Well-known_binary).
-
-In the "C" (for "compatibility") column, "o" indicates that the function
-implements the OpenGIS Simple Features Implementation Specification for SQL,
-[version 1.2.1](https://www.opengeospatial.org/standards/sfs);
-"p" indicates that the function is a
-[PostGIS](https://www.postgis.net/docs/reference.html) extension to OpenGIS;
-"h" indicates that the function is an
-[H2GIS](http://www.h2gis.org/docs/dev/functions/) extension.
-
-#### Geometry conversion functions (2D)
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| p | ST_AsBinary(geom) | Synonym for `ST_AsWKB`
-| p | ST_AsEWKB(geom) | Synonym for `ST_AsWKB`
-| p | ST_AsEWKT(geom) | Converts GEOMETRY → EWKT
-| p | ST_AsGeoJSON(geom) | Converts GEOMETRY → GeoJSON
-| p | ST_AsGML(geom) | Converts GEOMETRY → GML
-| p | ST_AsText(geom) | Synonym for `ST_AsWKT`
-| o | ST_AsWKB(geom) | Converts GEOMETRY → WKB
-| o | ST_AsWKT(geom) | Converts GEOMETRY → WKT
-| o | ST_Force2D(geom) | 3D GEOMETRY → 2D GEOMETRY
-| o | ST_GeomFromEWKB(wkb [, srid ]) | Synonym for `ST_GeomFromWKB`
-| o | ST_GeomFromEWKT(wkb [, srid ]) | Converts EWKT → GEOMETRY
-| o | ST_GeomFromGeoJSON(json) | Converts GeoJSON → GEOMETRY
-| o | ST_GeomFromGML(wkb [, srid ]) | Converts GML → GEOMETRY
-| o | ST_GeomFromText(wkt [, srid ]) | Synonym for `ST_GeomFromWKT`
-| o | ST_GeomFromWKB(wkb [, srid ]) | Converts WKB → GEOMETRY
-| o | ST_GeomFromWKT(wkb [, srid ]) | Converts WKT → GEOMETRY
-| o | ST_LineFromText(wkt [, srid ]) | Converts WKT → LINESTRING
-| o | ST_LineFromWKB(wkt [, srid ]) | Converts WKT → LINESTRING
-| o | ST_MLineFromText(wkt [, srid ]) | Converts WKT → MULTILINESTRING
-| o | ST_MPointFromText(wkt [, srid ]) | Converts WKT → MULTIPOINT
-| o | ST_MPolyFromText(wkt [, srid ]) Converts WKT → MULTIPOLYGON
-| o | ST_PointFromText(wkt [, srid ]) | Converts WKT → POINT
-| o | ST_PointFromWKB(wkt [, srid ]) | Converts WKB → POINT
-| o | ST_PolyFromText(wkt [, srid ]) | Converts WKT → POLYGON
-| o | ST_PolyFromWKB(wkt [, srid ]) | Converts WKB → POLYGON
-| h | ST_ToMultiPoint(geom) | Converts the coordinates of *geom* (which may be a GEOMETRYCOLLECTION) into a MULTIPOINT
-| h | ST_ToMultiLine(geom) | Converts the coordinates of *geom* (which may be a GEOMETRYCOLLECTION) into a MULTILINESTRING
-| h | ST_ToMultiSegments(geom) | Converts *geom* (which may be a GEOMETRYCOLLECTION) into a set of distinct segments stored in a MULTILINESTRING
-
-Not implemented:
-
-* ST_GoogleMapLink(geom [, layerType [, zoom ]]) GEOMETRY → Google map link
-* ST_OSMMapLink(geom [, marker ]) GEOMETRY → OSM map link
-
-#### Geometry conversion functions (3D)
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| o | ST_Force3D(geom) | 2D GEOMETRY → 3D GEOMETRY
-
-#### Geometry creation functions (2D)
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| h | ST_BoundingCircle(geom) | Returns the minimum bounding circle of *geom*
-| h | ST_Expand(geom, distance) | Expands *geom*'s envelope
-| h | ST_Expand(geom, deltaX, deltaY) | Expands *geom*'s envelope
-| h | ST_MakeEllipse(point, width, height) | Constructs an ellipse
-| p | ST_MakeEnvelope(xMin, yMin, xMax, yMax  [, srid ]) | Creates a rectangular POLYGON
-| h | ST_MakeGrid(geom, deltaX, deltaY) | Calculates a regular grid of POLYGONs based on *geom*
-| h | ST_MakeGridPoints(geom, deltaX, deltaY) | Calculates a regular grid of points based on *geom*
-| o | ST_MakeLine(point1 [, point ]*) | Creates a line-string from the given POINTs (or MULTIPOINTs)
-| p | ST_MakePoint(x, y [, z ]) | Synonym for `ST_Point`
-| p | ST_MakePolygon(lineString [, hole ]*)| Creates a POLYGON from *lineString* with the given holes (which are required to be closed LINESTRINGs)
-| h | ST_MinimumDiameter(geom) | Returns the minimum diameter of *geom*
-| h | ST_MinimumRectangle(geom) | Returns the minimum rectangle enclosing *geom*
-| h | ST_OctogonalEnvelope(geom) | Returns the octogonal envelope of *geom*
-| o | ST_Point(x, y [, z ]) | Constructs a point from two or three coordinates
-
-Not implemented:
-
-* ST_RingBuffer(geom, distance, bufferCount [, endCapStyle [, doDifference]]) Returns a MULTIPOLYGON of buffers centered at *geom* and of increasing buffer size
-
-### Geometry creation functions (3D)
-
-Not implemented:
-
-* ST_Extrude(geom, height [, flag]) Extrudes a GEOMETRY
-* ST_GeometryShadow(geom, point, height) Computes the shadow footprint of *geom*
-* ST_GeometryShadow(geom, azimuth, altitude, height [, unify ]) Computes the shadow footprint of *geom*
-
-#### Geometry properties (2D)
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| o | ST_Boundary(geom [, srid ]) | Returns the boundary of *geom*
-| o | ST_Centroid(geom) | Returns the centroid of *geom*
-| o | ST_CoordDim(geom) | Returns the dimension of the coordinates of *geom*
-| o | ST_Dimension(geom) | Returns the dimension of *geom*
-| o | ST_Distance(geom1, geom2) | Returns the distance between *geom1* and *geom2*
-| h | ST_ExteriorRing(geom) | Returns the exterior ring of *geom*, or null if *geom* is not a polygon
-| o | ST_GeometryType(geom) | Returns the type of *geom*
-| o | ST_GeometryTypeCode(geom) | Returns the OGC SFS type code of *geom*
-| p | ST_EndPoint(lineString) | Returns the last coordinate of *geom*
-| o | ST_Envelope(geom [, srid ]) | Returns the envelope of *geom* (which may be a GEOMETRYCOLLECTION) as a GEOMETRY
-| o | ST_Extent(geom) | Returns the minimum bounding box of *geom* (which may be a GEOMETRYCOLLECTION)
-| h | ST_GeometryN(geomCollection, n) | Returns the *n*th GEOMETRY of *geomCollection*
-| h | ST_InteriorRingN(geom) | Returns the nth interior ring of *geom*, or null if *geom* is not a polygon
-| h | ST_IsClosed(geom) | Returns whether *geom* is a closed LINESTRING or MULTILINESTRING
-| o | ST_IsEmpty(geom) | Returns whether *geom* is empty
-| o | ST_IsRectangle(geom) | Returns whether *geom* is a rectangle
-| h | ST_IsRing(geom) | Returns whether *geom* is a closed and simple line-string or MULTILINESTRING
-| o | ST_IsSimple(geom) | Returns whether *geom* is simple
-| o | ST_IsValid(geom) | Returns whether *geom* is valid
-| h | ST_NPoints(geom)  | Returns the number of points in *geom*
-| h | ST_NumGeometries(geom) | Returns the number of geometries in *geom* (1 if it is not a GEOMETRYCOLLECTION)
-| h | ST_NumInteriorRing(geom) | Synonym for `ST_NumInteriorRings`
-| h | ST_NumInteriorRings(geom) | Returns the number of interior rings of *geom*
-| h | ST_NumPoints(geom) | Returns the number of points in *geom*
-| p | ST_PointN(geom, n) | Returns the *n*th point of a *geom*
-| p | ST_PointOnSurface(geom) | Returns an interior or boundary point of *geom*
-| o | ST_SRID(geom) | Returns SRID value of *geom* or 0 if it does not have one
-| p | ST_StartPoint(geom) | Returns the first point of *geom*
-| o | ST_X(geom) | Returns the x-value of the first coordinate of *geom*
-| o | ST_XMax(geom) | Returns the maximum x-value of *geom*
-| o | ST_XMin(geom) | Returns the minimum x-value of *geom*
-| o | ST_Y(geom) | Returns the y-value of the first coordinate of *geom*
-| o | ST_YMax(geom) | Returns the maximum y-value of *geom*
-| o | ST_YMin(geom) | Returns the minimum y-value of *geom*
-
-Not implemented:
-
-* ST_CompactnessRatio(polygon) Returns the square root of *polygon*'s area divided by the area of the circle with circumference equal to its perimeter
-* ST_Explode(query [, fieldName]) Explodes the GEOMETRYCOLLECTIONs in the *fieldName* column of a query into multiple geometries
-* ST_IsValidDetail(geom [, selfTouchValid ]) Returns a valid detail as an array of objects
-* ST_IsValidReason(geom [, selfTouchValid ]) Returns text stating whether *geom* is valid, and if not valid, a reason why
-
-
-#### Geometry properties (3D)
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| p | ST_Is3D(s) | Returns whether *geom* has at least one z-coordinate
-| o | ST_Z(geom) | Returns the z-value of the first coordinate of *geom*
-| o | ST_ZMax(geom) | Returns the maximum z-value of *geom*
-| o | ST_ZMin(geom) | Returns the minimum z-value of *geom*
-
-### Geometry predicates
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| o | ST_Contains(geom1, geom2) | Returns whether *geom1* contains *geom2*
-| p | ST_ContainsProperly(geom1, geom2) | Returns whether *geom1* contains *geom2* but does not intersect its boundary
-| p | ST_Covers(geom1, geom2) | Returns whether no point in *geom2* is outside *geom1*
-| o | ST_Crosses(geom1, geom2) | Returns whether *geom1* crosses *geom2*
-| o | ST_Disjoint(geom1, geom2) | Returns whether *geom1* and *geom2* are disjoint
-| p | ST_DWithin(geom1, geom2, distance) | Returns whether *geom1* and *geom* are within *distance* of one another
-| o | ST_EnvelopesIntersect(geom1, geom2) | Returns whether the envelope of *geom1* intersects the envelope of *geom2*
-| o | ST_Equals(geom1, geom2) | Returns whether *geom1* equals *geom2*
-| o | ST_Intersects(geom1, geom2) | Returns whether *geom1* intersects *geom2*
-| o | ST_Overlaps(geom1, geom2) | Returns whether *geom1* overlaps *geom2*
-| o | ST_Relate(geom1, geom2) | Returns the DE-9IM intersection matrix of *geom1* and *geom2*
-| o | ST_Relate(geom1, geom2, iMatrix) | Returns whether *geom1* and *geom2* are related by the given intersection matrix *iMatrix*
-| o | ST_Touches(geom1, geom2) | Returns whether *geom1* touches *geom2*
-| o | ST_Within(geom1, geom2) | Returns whether *geom1* is within *geom2*
-
-Not implemented:
-
-* ST_OrderingEquals(geom1, geom2) Returns whether *geom1* equals *geom2* and their coordinates and component Geometries are listed in the same order
-
-#### Geometry operators (2D)
-
-The following functions combine 2D geometries.
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| o | ST_Buffer(geom, distance [, quadSegs \| style ]) | Computes a buffer around *geom*
-| o | ST_ConvexHull(geom) | Computes the smallest convex polygon that contains all the points in *geom*
-| o | ST_Difference(geom1, geom2) | Computes the difference between two geometries
-| o | ST_SymDifference(geom1, geom2) | Computes the symmetric difference between two geometries
-| o | ST_Intersection(geom1, geom2) | Computes the intersection of *geom1* and *geom2*
-| o | ST_Union(geom1, geom2) | Computes the union of *geom1* and *geom2*
-| o | ST_Union(geomCollection) | Computes the union of the geometries in *geomCollection*
-
-See also: the `ST_Union` aggregate function.
-
-#### Affine transformation functions (3D and 2D)
-
-The following functions transform 2D geometries.
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| o | ST_Rotate(geom, angle [, origin \| x, y]) | Rotates a *geom* counter-clockwise by *angle* (in radians) about *origin* (or the point (*x*, *y*))
-| o | ST_Scale(geom, xFactor, yFactor) | Scales *geom* by multiplying the ordinates by the indicated scale factors
-| o | ST_Translate(geom, x, y) | Translates *geom* by the vector (x, y)
-
-Not implemented:
-
-* ST_Scale(geom, xFactor, yFactor [, zFactor ]) Scales *geom* by multiplying the ordinates by the indicated scale factors
-* ST_Translate(geom, x, y, [, z]) Translates *geom*
-
-#### Geometry editing functions (2D)
-
-The following functions modify 2D geometries.
-
-Not implemented:
-
-* ST_AddPoint(geom, point [, tolerance ]) Adds *point* to *geom* with a given *tolerance* (default 0)
-* ST_CollectionExtract(geom, dimension) Filters *geom*, returning a multi-geometry of those members with a given *dimension* (1 = point, 2 = line-string, 3 = polygon)
-* ST_Densify(geom, tolerance) Inserts extra vertices every *tolerance* along the line segments of *geom*
-* ST_FlipCoordinates(geom) Flips the X and Y coordinates of *geom*
-* ST_Holes(geom) Returns the holes in *geom* (which may be a GEOMETRYCOLLECTION)
-* ST_Normalize(geom) Converts *geom* to normal form
-* ST_RemoveDuplicatedCoordinates(geom) Removes duplicated coordinates from *geom*
-* ST_RemoveHoles(geom) Removes a *geom*'s holes
-* ST_RemovePoints(geom, poly) Removes all coordinates of *geom* located within *poly*; null if all coordinates are removed
-* ST_RemoveRepeatedPoints(geom, tolerance) Removes from *geom* all repeated points (or points within *tolerance* of another point)
-* ST_Reverse(geom) Reverses the vertex order of *geom*
-
-#### Geometry editing functions (3D)
-
-The following functions modify 3D geometries.
-
-Not implemented:
-
-* ST_AddZ(geom, zToAdd) Adds *zToAdd* to the z-coordinate of *geom*
-* ST_Interpolate3DLine(geom) Returns *geom* with an interpolation of z values, or null if it is not a line-string or MULTILINESTRING
-* ST_MultiplyZ(geom, zFactor) Returns *geom* with its z-values multiplied by *zFactor*
-* ST_Reverse3DLine(geom [, sortOrder ]) Potentially reverses *geom* according to the z-values of its first and last coordinates
-* ST_UpdateZ(geom, newZ [, updateCondition ]) Updates the z-values of *geom*
-* ST_ZUpdateLineExtremities(geom, startZ, endZ [, interpolate ]) Updates the start and end z-values of *geom*
-
-#### Geometry measurement functions (2D)
-
-Not implemented:
-
-* ST_Area(geom) Returns the area of *geom* (which may be a GEOMETRYCOLLECTION)
-* ST_ClosestCoordinate(geom, point) Returns the coordinate(s) of *geom* closest to *point*
-* ST_ClosestPoint(geom1, geom2) Returns the point of *geom1* closest to *geom2*
-* ST_FurthestCoordinate(geom, point) Returns the coordinate(s) of *geom* that are furthest from *point*
-* ST_Length(lineString) Returns the length of *lineString*
-* ST_LocateAlong(geom, segmentLengthFraction, offsetDistance) Returns a MULTIPOINT containing points along the line segments of *geom* at *segmentLengthFraction* and *offsetDistance*
-* ST_LongestLine(geom1, geom2) Returns the 2-dimensional longest line-string between the points of *geom1* and *geom2*
-* ST_MaxDistance(geom1, geom2) Computes the maximum distance between *geom1* and *geom2*
-* ST_Perimeter(polygon) Returns the length of the perimeter of *polygon* (which may be a MULTIPOLYGON)
-* ST_ProjectPoint(point, lineString) Projects *point* onto a *lineString* (which may be a MULTILINESTRING)
-
-#### Geometry measurement functions (3D)
-
-Not implemented:
-
-* ST_3DArea(geom) Return a polygon's 3D area
-* ST_3DLength(geom) Returns the 3D length of a line-string
-* ST_3DPerimeter(geom) Returns the 3D perimeter of a polygon or MULTIPOLYGON
-* ST_SunPosition(point [, timestamp ]) Computes the sun position at *point* and *timestamp* (now by default)
-
-#### Geometry processing functions (2D)
-
-The following functions process geometries.
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| o | ST_LineMerge(geom)  | Merges a collection of linear components to form a line-string of maximal length
-| o | ST_MakeValid(geom)  | Makes a valid geometry of a given invalid geometry
-| o | ST_Polygonize(geom)  | Creates a MULTIPOLYGON from edges of *geom*
-| o | ST_PrecisionReducer(geom, n) | Reduces *geom*'s precision to *n* decimal places
-| o | ST_Simplify(geom, distance)  | Simplifies *geom* using the [Douglas-Peuker algorithm](https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm) with a *distance* tolerance
-| o | ST_SimplifyPreserveTopology(geom, distance) | Simplifies *geom*, preserving its topology
-| o | ST_Snap(geom1, geom2, tolerance) | Snaps *geom1* and *geom2* together
-
-Not implemented:
-
-* ST_LineIntersector(geom1, geom2) Splits *geom1* (a line-string) with *geom2*
-* ST_LineMerge(geom) Merges a collection of linear components to form a line-string of maximal length
-* ST_MakeValid(geom [, preserveGeomDim [, preserveDuplicateCoord [, preserveCoordDim]]]) Makes *geom* valid
-* ST_RingSideBuffer(geom, distance, bufferCount [, endCapStyle [, doDifference]]) Computes a ring buffer on one side
-* ST_SideBuffer(geom, distance [, bufferStyle ]) Compute a single buffer on one side
-* ST_Split(geom1, geom2 [, tolerance]) Splits *geom1* by *geom2* using *tolerance* (default 1E-6) to determine where the point splits the line
-
-#### Geometry projection functions
-
-| C | Operator syntax      | Description
-|:- |:-------------------- |:-----------
-| o | ST_SetSRID(geom, srid) | Returns a copy of *geom* with a new SRID
-| o | ST_Transform(geom, srid) | Transforms *geom* from one coordinate reference system (CRS) to the CRS specified by *srid*
-
-#### Trigonometry functions
-
-Not implemented:
-
-* ST_Azimuth(point1, point2) Return the azimuth of the segment from *point1* to *point2*
-
-#### Topography functions
-
-Not implemented:
-
-* ST_TriangleAspect(geom) Returns the aspect of a triangle
-* ST_TriangleContouring(query \[, z1, z2, z3 ]\[, varArgs]*) Splits triangles into smaller triangles according to classes
-* ST_TriangleDirection(geom) Computes the direction of steepest ascent of a triangle and returns it as a line-string
-* ST_TriangleSlope(geom) Computes the slope of a triangle as a percentage
-* ST_Voronoi(geom [, outDimension [, envelopePolygon ]]) Creates a Voronoi diagram
-
-#### Triangulation functions
-
-Not implemented:
-
-* ST_ConstrainedDelaunay(geom [, flag [, quality ]]) Computes a constrained Delaunay triangulation based on *geom*
-* ST_Delaunay(geom [, flag [, quality ]]) Computes a Delaunay triangulation based on points
-* ST_Tessellate(polygon) Tessellates *polygon* (may be MULTIPOLYGON) with adaptive triangles
-
-#### Geometry aggregate functions
-
-Not implemented:
-
-* ST_Accum(geom) Accumulates *geom* into a GEOMETRYCOLLECTION (or MULTIPOINT, MULTILINESTRING or MULTIPOLYGON if possible)
-* ST_Collect(geom) Synonym for `ST_Accum`
-* ST_Union(geom) Computes the union of geometries
-
-### JSON Functions
-
-In the following:
-
-* *jsonValue* is a character string containing a JSON value;
-* *path* is a character string containing a JSON path expression; mode flag `strict` or `lax` should be specified in the beginning of *path*.
-
-#### Query Functions
-
-| Operator syntax        | Description
-|:---------------------- |:-----------
-| JSON_EXISTS(jsonValue, path [ { TRUE &#124; FALSE &#124; UNKNOWN &#124; ERROR } ON ERROR ] ) | Whether a *jsonValue* satisfies a search criterion described using JSON path expression *path*
-| JSON_VALUE(jsonValue, path [ RETURNING type ] [ { ERROR &#124; NULL &#124; DEFAULT expr } ON EMPTY ] [ { ERROR &#124; NULL &#124; DEFAULT expr } ON ERROR ] ) | Extract an SQL scalar from a *jsonValue* using JSON path expression *path*
-| JSON_QUERY(jsonValue, path [ { WITHOUT [ ARRAY ] &#124; WITH [ CONDITIONAL &#124; UNCONDITIONAL ] [ ARRAY ] } WRAPPER ] [ { ERROR &#124; NULL &#124; EMPTY ARRAY &#124; EMPTY OBJECT } ON EMPTY ] [ { ERROR &#124; NULL &#124; EMPTY ARRAY &#124; EMPTY OBJECT } ON ERROR ] ) | Extract a JSON object or JSON array from *jsonValue* using the *path* JSON path expression
-
-Note:
-
-* The `ON ERROR` and `ON EMPTY` clauses define the fallback
-  behavior of the function when an error is thrown or a null value
-  is about to be returned.
-* The `ARRAY WRAPPER` clause defines how to represent a JSON array result
-  in `JSON_QUERY` function. The following examples compare the wrapper
-  behaviors.
-
-Example Data:
-
-{% highlight json %}
-{"a": "[1,2]", "b": [1,2], "c": "hi"}
-{% endhighlight json %}
-
-Comparison:
-
-|Operator                                    |$.a          |$.b          |$.c
-|:-------------------------------------------|:------------|:------------|:------------
-|JSON_VALUE                                  | [1, 2]      | error       | hi
-|JSON QUERY WITHOUT ARRAY WRAPPER            | error       | [1, 2]      | error
-|JSON QUERY WITH UNCONDITIONAL ARRAY WRAPPER | [ "[1,2]" ] | [ [1,2] ]   | [ "hi" ]
-|JSON QUERY WITH CONDITIONAL ARRAY WRAPPER   | [ "[1,2]" ] | [1,2]       | [ "hi" ]
-
-Not implemented:
-
-* JSON_TABLE
-
-#### Constructor Functions
-
-| Operator syntax        | Description
-|:---------------------- |:-----------
-| JSON_OBJECT( jsonKeyVal [, jsonKeyVal ]* [ nullBehavior ] ) | Construct JSON object using a series of key-value pairs
-| JSON_OBJECTAGG( jsonKeyVal [ nullBehavior ] ) | Aggregate function to construct a JSON object using a key-value pair
-| JSON_ARRAY( [ jsonVal [, jsonVal ]* ] [ nullBehavior ] ) | Construct a JSON array using a series of values
-| JSON_ARRAYAGG( jsonVal [ ORDER BY orderItem [, orderItem ]* ] [ nullBehavior ] ) | Aggregate function to construct a JSON array using a value
-
-{% highlight sql %}
-jsonKeyVal:
-      [ KEY ] name VALUE value [ FORMAT JSON ]
-  |   name : value [ FORMAT JSON ]
-
-jsonVal:
-      value [ FORMAT JSON ]
-
-nullBehavior:
-      NULL ON NULL
-  |   ABSENT ON NULL
-{% endhighlight %}
-
-Note:
-
-* The flag `FORMAT JSON` indicates the value is formatted as JSON
-  character string. When `FORMAT JSON` is used, the value should be
-  de-parse from JSON character string to a SQL structured value.
-* `ON NULL` clause defines how the JSON output represents null
-  values. The default null behavior of `JSON_OBJECT` and
-  `JSON_OBJECTAGG` is `NULL ON NULL`, and for `JSON_ARRAY` and
-  `JSON_ARRAYAGG` it is `ABSENT ON NULL`.
-* If `ORDER BY` clause is provided, `JSON_ARRAYAGG` sorts the
-  input rows into the specified order before performing aggregation.
-
-#### Comparison Operators
-
-| Operator syntax                   | Description
-|:--------------------------------- |:-----------
-| jsonValue IS JSON [ VALUE ]       | Whether *jsonValue* is a JSON value
-| jsonValue IS NOT JSON [ VALUE ]   | Whether *jsonValue* is not a JSON value
-| jsonValue IS JSON SCALAR          | Whether *jsonValue* is a JSON scalar value
-| jsonValue IS NOT JSON SCALAR      | Whether *jsonValue* is not a JSON scalar value
-| jsonValue IS JSON OBJECT          | Whether *jsonValue* is a JSON object
-| jsonValue IS NOT JSON OBJECT      | Whether *jsonValue* is not a JSON object
-| jsonValue IS JSON ARRAY           | Whether *jsonValue* is a JSON array
-| jsonValue IS NOT JSON ARRAY       | Whether *jsonValue* is not a JSON array
-
-### Dialect-specific Operators
-
-The following operators are not in the SQL standard, and are not enabled in
-Calcite's default operator table. They are only available for use in queries
-if your session has enabled an extra operator table.
-
-To enable an operator table, set the
-[fun]({{ site.baseurl }}/docs/adapter.html#jdbc-connect-string-parameters)
-connect string parameter.
-
-The 'C' (compatibility) column contains value:
-* 'b' for Google BigQuery ('fun=bigquery' in the connect string),
-* 'h' for Apache Hive ('fun=hive' in the connect string),
-* 'm' for MySQL ('fun=mysql' in the connect string),
-* 'o' for Oracle ('fun=oracle' in the connect string),
-* 'p' for PostgreSQL ('fun=postgresql' in the connect string),
-* 's' for Apache Spark ('fun=spark' in the connect string).
-
-One operator name may correspond to multiple SQL dialects, but with different
-semantics.
-
-| C | Operator syntax                                | Description
-|:- |:-----------------------------------------------|:-----------
-| p | expr :: type                                   | Casts *expr* to *type*
-| m | expr1 <=> expr2                                | Whether two values are equal, treating null values as the same, and it's similar to `IS NOT DISTINCT FROM`
-| b | ARRAY_CONCAT(array [, array ]*)                | Concatenates one or more arrays. If any input argument is `NULL` the function returns `NULL`
-| b | ARRAY_LENGTH(array)                            | Synonym for `CARDINALITY`
-| b | ARRAY_REVERSE(array)                           | Reverses elements of *array*
-| m s | CHAR(integer)                                | Returns the character whose ASCII code is *integer* % 256, or null if *integer* &lt; 0
-| o p | CHR(integer)                                 | Returns the character whose UTF-8 code is *integer*
-| o | COSH(numeric)                                  | Returns the hyperbolic cosine of *numeric*
-| o | CONCAT(string, string)                         | Concatenates two strings
-| m p | CONCAT(string [, string ]*)                  | Concatenates two or more strings
-| m | COMPRESS(string)                               | Compresses a string using zlib compression and returns the result as a binary string.
-| p | CONVERT_TIMEZONE(tz1, tz2, datetime)           | Converts the timezone of *datetime* from *tz1* to *tz2*
-| b | CURRENT_DATETIME([timezone])                   | Returns the current time as a TIMESTAMP from *timezone*
-| m | DAYNAME(datetime)                              | Returns the name, in the connection's locale, of the weekday in *datetime*; for example, it returns '星期日' for both DATE '2020-02-10' and TIMESTAMP '2020-02-10 10:10:10'
-| b | DATE(string)                                   | Equivalent to `CAST(string AS DATE)`
-| b | DATE_FROM_UNIX_DATE(integer)                   | Returns the DATE that is *integer* days after 1970-01-01
-| o | DECODE(value, value1, result1 [, valueN, resultN ]* [, default ]) | Compares *value* to each *valueN* value one by one; if *value* is equal to a *valueN*, returns the corresponding *resultN*, else returns *default*, or NULL if *default* is not specified
-| p | DIFFERENCE(string, string)                     | Returns a measure of the similarity of two strings, namely the number of character positions that their `SOUNDEX` values have in common: 4 if the `SOUNDEX` values are same and 0 if the `SOUNDEX` values are totally different
-| o | EXTRACT(xml, xpath, [, namespaces ])           | Returns the xml fragment of the element or elements matched by the XPath expression. The optional namespace value that specifies a default mapping or namespace mapping for prefixes, which is used when evaluating the XPath expression
-| o | EXISTSNODE(xml, xpath, [, namespaces ])        | Determines whether traversal of a XML document using a specified xpath results in any nodes. Returns 0 if no nodes remain after applying the XPath traversal on the document fragment of the element or elements matched by the XPath expression. Returns 1 if any nodes remain. The optional namespace value that specifies a default mapping or namespace mapping for prefixes, which is used when evaluating the XPath expression.
-| m | EXTRACTVALUE(xml, xpathExpr))                  | Returns the text of the first text node which is a child of the element or elements matched by the XPath expression.
-| o | GREATEST(expr [, expr ]*)                      | Returns the greatest of the expressions
-| b h s | IF(condition, value1, value2)              | Returns *value1* if *condition* is TRUE, *value2* otherwise
-| p | string1 ILIKE string2 [ ESCAPE string3 ]       | Whether *string1* matches pattern *string2*, ignoring case (similar to `LIKE`)
-| p | string1 NOT ILIKE string2 [ ESCAPE string3 ]   | Whether *string1* does not match pattern *string2*, ignoring case (similar to `NOT LIKE`)
-| m | JSON_TYPE(jsonValue)                           | Returns a string value indicating the type of *jsonValue*
-| m | JSON_DEPTH(jsonValue)                          | Returns an integer value indicating the depth of *jsonValue*
-| m | JSON_PRETTY(jsonValue)                         | Returns a pretty-printing of *jsonValue*
-| m | JSON_LENGTH(jsonValue [, path ])               | Returns a integer indicating the length of *jsonValue*
-| m | JSON_KEYS(jsonValue [, path ])                 | Returns a string indicating the keys of a JSON *jsonValue*
-| m | JSON_REMOVE(jsonValue, path[, path])           | Removes data from *jsonValue* using a series of *path* expressions and returns the result
-| m | JSON_STORAGE_SIZE(jsonValue)                   | Returns the number of bytes used to store the binary representation of *jsonValue*
-| o | LEAST(expr [, expr ]* )                        | Returns the least of the expressions
-| m p | LEFT(string, length)                         | Returns the leftmost *length* characters from the *string*
-| m | TO_BASE64(string)                              | Converts the *string* to base-64 encoded form and returns a encoded string
-| m | FROM_BASE64(string)                            | Returns the decoded result of a base-64 *string* as a string
-| o | LTRIM(string)                                  | Returns *string* with all blanks removed from the start
-| m p | MD5(string)                                  | Calculates an MD5 128-bit checksum of *string* and returns it as a hex string
-| m | MONTHNAME(date)                                | Returns the name, in the connection's locale, of the month in *datetime*; for example, it returns '二月' for both DATE '2020-02-10' and TIMESTAMP '2020-02-10 10:10:10'
-| o | NVL(value1, value2)                            | Returns *value1* if *value1* is not null, otherwise *value2*
-| m o | REGEXP_REPLACE(string, regexp, rep, [, pos [, occurrence [, matchType]]]) | Replaces all substrings of *string* that match *regexp* with *rep* at the starting *pos* in expr (if omitted, the default is 1), *occurrence* means which occurrence of a match to search for (if omitted, the default is 1), *matchType* specifies how to perform matching
-| m p | REPEAT(string, integer)                      | Returns a string consisting of *string* repeated of *integer* times; returns an empty string if *integer* is less than 1
-| m | REVERSE(string)                                | Returns *string* with the order of the characters reversed
-| m p | RIGHT(string, length)                        | Returns the rightmost *length* characters from the *string*
-| h s | string1 RLIKE string2                        | Whether *string1* matches regex pattern *string2* (similar to `LIKE`, but uses Java regex)
-| h s | string1 NOT RLIKE string2                    | Whether *string1* does not match regex pattern *string2* (similar to `NOT LIKE`, but uses Java regex)
-| o | RTRIM(string)                                  | Returns *string* with all blanks removed from the end
-| m p | SHA1(string)                                 | Calculates a SHA-1 hash value of *string* and returns it as a hex string
-| o | SINH(numeric)                                  | Returns the hyperbolic sine of *numeric*
-| m o p | SOUNDEX(string)                            | Returns the phonetic representation of *string*; throws if *string* is encoded with multi-byte encoding such as UTF-8
-| m | SPACE(integer)                                 | Returns a string of *integer* spaces; returns an empty string if *integer* is less than 1
-| b m o p | SUBSTR(string, position [, substringLength ]) | Returns a portion of *string*, beginning at character *position*, *substringLength* characters long. SUBSTR calculates lengths using characters as defined by the input character set
-| m | STRCMP(string, string)                         | Returns 0 if both of the strings are same and returns -1 when the first argument is smaller than the second and 1 when the second one is smaller than the first one
-| o | TANH(numeric)                                  | Returns the hyperbolic tangent of *numeric*
-| b | TIMESTAMP_MICROS(integer)                      | Returns the TIMESTAMP that is *integer* microseconds after 1970-01-01 00:00:00
-| b | TIMESTAMP_MILLIS(integer)                      | Returns the TIMESTAMP that is *integer* milliseconds after 1970-01-01 00:00:00
-| b | TIMESTAMP_SECONDS(integer)                     | Returns the TIMESTAMP that is *integer* seconds after 1970-01-01 00:00:00
-| o p | TO_DATE(string, format)                      | Converts *string* to a date using the format *format*
-| o p | TO_TIMESTAMP(string, format)                 | Converts *string* to a timestamp using the format *format*
-| o p | TRANSLATE(expr, fromString, toString)        | Returns *expr* with all occurrences of each character in *fromString* replaced by its corresponding character in *toString*. Characters in *expr* that are not in *fromString* are not replaced
-| b | UNIX_MICROS(timestamp)                         | Returns the number of microseconds since 1970-01-01 00:00:00
-| b | UNIX_MILLIS(timestamp)                         | Returns the number of milliseconds since 1970-01-01 00:00:00
-| b | UNIX_SECONDS(timestamp)                        | Returns the number of seconds since 1970-01-01 00:00:00
-| b | UNIX_DATE(date)                                | Returns the number of days since 1970-01-01
-| o | XMLTRANSFORM(xml, xslt)                        | Applies XSLT transform *xslt* to XML string *xml* and returns the result
-
-Note:
-
-* `JSON_TYPE` / `JSON_DEPTH` / `JSON_PRETTY` / `JSON_STORAGE_SIZE` return null if the argument is null
-* `JSON_LENGTH` / `JSON_KEYS` / `JSON_REMOVE` return null if the first argument is null
-* `JSON_TYPE` generally returns an upper-case string flag indicating the type of the JSON input. Currently supported supported type flags are:
-  * INTEGER
-  * STRING
-  * FLOAT
-  * DOUBLE
-  * LONG
-  * BOOLEAN
-  * DATE
-  * OBJECT
-  * ARRAY
-  * NULL
-* `JSON_DEPTH` defines a JSON value's depth as follows:
-  * An empty array, empty object, or scalar value has depth 1;
-  * A non-empty array containing only elements of depth 1 or non-empty object containing only member values of depth 1 has depth 2;
-  * Otherwise, a JSON document has depth greater than 2.
-* `JSON_LENGTH` defines a JSON value's length as follows:
-  * A scalar value has length 1;
-  * The length of array or object is the number of elements is contains.
-
-Dialect-specific aggregate functions.
-
-| C | Operator syntax                                | Description
-|:- |:-----------------------------------------------|:-----------
-| b p | ARRAY_AGG( [ ALL &#124; DISTINCT ] value [ RESPECT NULLS &#124; IGNORE NULLS ] [ ORDER BY orderItem [, orderItem ]* ] ) | Gathers values into arrays
-| b p | ARRAY_CONCAT_AGG( [ ALL &#124; DISTINCT ] value [ ORDER BY orderItem [, orderItem ]* ] ) | Concatenates arrays into arrays
-| p | BOOL_AND(condition)                            | Synonym for `EVERY`
-| p | BOOL_OR(condition)                             | Synonym for `SOME`
-| b | COUNTIF(condition)                             | Returns the number of rows for which *condition* is TRUE; equivalent to `COUNT(*) FILTER (WHERE condition)`
-| m | GROUP_CONCAT( [ ALL &#124; DISTINCT ] value [, value ]* [ ORDER BY orderItem [, orderItem ]* ] [ SEPARATOR separator ] ) | MySQL-specific variant of `LISTAGG`
-| b | LOGICAL_AND(condition)                         | Synonym for `EVERY`
-| b | LOGICAL_OR(condition)                          | Synonym for `SOME`
-| b p | STRING_AGG( [ ALL &#124; DISTINCT ] value [, separator] [ ORDER BY orderItem [, orderItem ]* ] ) | Synonym for `LISTAGG`
-
-Usage Examples:
-
-##### JSON_TYPE example
-
-SQL
-
-{% highlight sql %}
-SELECT JSON_TYPE(v) AS c1,
-  JSON_TYPE(JSON_VALUE(v, 'lax $.b' ERROR ON ERROR)) AS c2,
-  JSON_TYPE(JSON_VALUE(v, 'strict $.a[0]' ERROR ON ERROR)) AS c3,
-  JSON_TYPE(JSON_VALUE(v, 'strict $.a[1]' ERROR ON ERROR)) AS c4
-FROM (VALUES ('{"a": [10, true],"b": "[10, true]"}')) AS t(v)
-LIMIT 10;
-{% endhighlight %}
-
-Result
-
-| c1     | c2    | c3      | c4      |
-|:------:|:-----:|:-------:|:-------:|
-| OBJECT | ARRAY | INTEGER | BOOLEAN |
-
-##### JSON_DEPTH example
-
-SQL
-
-{% highlight sql %}
-SELECT JSON_DEPTH(v) AS c1,
-  JSON_DEPTH(JSON_VALUE(v, 'lax $.b' ERROR ON ERROR)) AS c2,
-  JSON_DEPTH(JSON_VALUE(v, 'strict $.a[0]' ERROR ON ERROR)) AS c3,
-  JSON_DEPTH(JSON_VALUE(v, 'strict $.a[1]' ERROR ON ERROR)) AS c4
-FROM (VALUES ('{"a": [10, true],"b": "[10, true]"}')) AS t(v)
-LIMIT 10;
-{% endhighlight %}
-
-Result
-
-| c1     | c2    | c3      | c4      |
-|:------:|:-----:|:-------:|:-------:|
-| 3      | 2     | 1       | 1       |
-
-##### JSON_LENGTH example
-
-SQL
-
-{% highlight sql %}
-SELECT JSON_LENGTH(v) AS c1,
-  JSON_LENGTH(v, 'lax $.a') AS c2,
-  JSON_LENGTH(v, 'strict $.a[0]') AS c3,
-  JSON_LENGTH(v, 'strict $.a[1]') AS c4
-FROM (VALUES ('{"a": [10, true]}')) AS t(v)
-LIMIT 10;
-{% endhighlight %}
-
-Result
-
-| c1     | c2    | c3      | c4      |
-|:------:|:-----:|:-------:|:-------:|
-| 1      | 2     | 1       | 1       |
-
-##### JSON_KEYS example
-
-SQL
-
-{% highlight sql %}
-SELECT JSON_KEYS(v) AS c1,
-  JSON_KEYS(v, 'lax $.a') AS c2,
-  JSON_KEYS(v, 'lax $.b') AS c2,
-  JSON_KEYS(v, 'strict $.a[0]') AS c3,
-  JSON_KEYS(v, 'strict $.a[1]') AS c4
-FROM (VALUES ('{"a": [10, true],"b": {"c": 30}}')) AS t(v)
-LIMIT 10;
-{% endhighlight %}
-
- Result
-
-| c1         | c2   | c3    | c4   | c5   |
-|:----------:|:----:|:-----:|:----:|:----:|
-| ["a", "b"] | NULL | ["c"] | NULL | NULL |
-
-##### JSON_REMOVE example
-
-SQL
-
-{% highlight sql %}
-SELECT JSON_REMOVE(v, '$[1]') AS c1
-FROM (VALUES ('["a", ["b", "c"], "d"]')) AS t(v)
-LIMIT 10;
-{% endhighlight %}
-
- Result
-
-| c1         |
-|:----------:|
-| ["a", "d"] |
-
-
-##### JSON_STORAGE_SIZE example
-
-SQL
-
-{% highlight sql %}
-SELECT
-JSON_STORAGE_SIZE('[100, \"sakila\", [1, 3, 5], 425.05]') AS c1,
-JSON_STORAGE_SIZE('{\"a\": 10, \"b\": \"a\", \"c\": \"[1, 3, 5, 7]\"}') AS c2,
-JSON_STORAGE_SIZE('{\"a\": 10, \"b\": \"xyz\", \"c\": \"[1, 3, 5, 7]\"}') AS c3,
-JSON_STORAGE_SIZE('[100, \"json\", [[10, 20, 30], 3, 5], 425.05]') AS c4
-limit 10;
-{% endhighlight %}
-
- Result
-
-| c1 | c2 | c3 | c4 |
-|:--:|:---:|:---:|:--:|
-| 29 | 35 | 37 | 36 |
-
-
-#### DECODE example
-
-SQL
-
-{% highlight sql %}
-SELECT DECODE(f1, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c1,
-  DECODE(f2, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c2,
-  DECODE(f3, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c3,
-  DECODE(f4, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c4,
-  DECODE(f5, 1, 'aa', 2, 'bb', 3, 'cc', 4, 'dd', 'ee') as c5
-FROM (VALUES (1, 2, 3, 4, 5)) AS t(f1, f2, f3, f4, f5);
-{% endhighlight %}
-
- Result
-
-| c1          | c2          | c3          | c4          | c5          |
-|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
-| aa          | bb          | cc          | dd          | ee          |
-
-#### TRANSLATE example
-
-SQL
-
-{% highlight sql %}
-SELECT TRANSLATE('Aa*Bb*Cc''D*d', ' */''%', '_') as c1,
-  TRANSLATE('Aa/Bb/Cc''D/d', ' */''%', '_') as c2,
-  TRANSLATE('Aa Bb Cc''D d', ' */''%', '_') as c3,
-  TRANSLATE('Aa%Bb%Cc''D%d', ' */''%', '_') as c4
-FROM (VALUES (true)) AS t(f0);
-{% endhighlight %}
-
-Result
-
-| c1          | c2          | c3          | c4          |
-|:-----------:|:-----------:|:-----------:|:-----------:|
-| Aa_Bb_CcD_d | Aa_Bb_CcD_d | Aa_Bb_CcD_d | Aa_Bb_CcD_d |
-
-Not implemented:
-
-* JSON_INSERT
-* JSON_SET
-* JSON_REPLACE
-
-## User-defined functions
-
-Calcite is extensible. You can define each kind of function using user code.
-For each kind of function there are often several ways to define a function,
-varying from convenient to efficient.
-
-To implement a *scalar function*, there are 3 options:
-
-* Create a class with a public static `eval` method,
-  and register the class;
-* Create a class with a public non-static `eval` method,
-  and a public constructor with no arguments,
-  and register the class;
-* Create a class with one or more public static methods,
-  and register each class/method combination.
-
-To implement an *aggregate function*, there are 2 options:
-
-* Create a class with public static `init`, `add` and `result` methods,
-  and register the class;
-* Create a class with public non-static `init`, `add` and `result` methods,
-  and a  public constructor with no arguments,
-  and register the class.
-
-Optionally, add a public `merge` method to the class; this allows Calcite to
-generate code that merges sub-totals.
-
-Optionally, make your class implement the
-[SqlSplittableAggFunction]({{ site.apiRoot }}/org/apache/calcite/sql/SqlSplittableAggFunction.html)
-interface; this allows Calcite to decompose the function across several stages
-of aggregation, roll up from summary tables, and push it through joins.
-
-To implement a *table function*, there are 3 options:
-
-* Create a class with a static `eval` method that returns
-  [ScannableTable]({{ site.apiRoot }}/org/apache/calcite/schema/ScannableTable.html)
-  or
-  [QueryableTable]({{ site.apiRoot }}/org/apache/calcite/schema/QueryableTable.html),
-  and register the class;
-* Create a class with a non-static `eval` method that returns
-  [ScannableTable]({{ site.apiRoot }}/org/apache/calcite/schema/ScannableTable.html)
-  or
-  [QueryableTable]({{ site.apiRoot }}/org/apache/calcite/schema/QueryableTable.html),
-  and register the class;
-* Create a class with one or more public static methods that return
-  [ScannableTable]({{ site.apiRoot }}/org/apache/calcite/schema/ScannableTable.html)
-  or
-  [QueryableTable]({{ site.apiRoot }}/org/apache/calcite/schema/QueryableTable.html),
-  and register each class/method combination.
-
-To implement a *table macro*, there are 3 options:
-
-* Create a class with a static `eval` method that returns
-  [TranslatableTable]({{ site.apiRoot }}/org/apache/calcite/schema/TranslatableTable.html),
-  and register the class;
-* Create a class with a non-static `eval` method that returns
-  [TranslatableTable]({{ site.apiRoot }}/org/apache/calcite/schema/TranslatableTable.html),
-  and register the class;
-* Create a class with one or more public static methods that return
-  [TranslatableTable]({{ site.apiRoot }}/org/apache/calcite/schema/TranslatableTable.html),
-  and register each class/method combination.
-
-Calcite deduces the parameter types and result type of a function from the
-parameter and return types of the Java method that implements it. Further, you
-can specify the name and optionality of each parameter using the
-[Parameter]({{ site.apiRoot }}/org/apache/calcite/linq4j/function/Parameter.html)
-annotation.
-
-### Calling functions with named and optional parameters
-
-Usually when you call a function, you need to specify all of its parameters,
-in order. But that can be a problem if a function has a lot of parameters,
-and especially if you want to add more parameters over time.
-
-To solve this problem, the SQL standard allows you to pass parameters by name,
-and to define parameters which are optional (that is, have a default value
-that is used if they are not specified).
-
-Suppose you have a function `f`, declared as in the following pseudo syntax:
-
-{% highlight sql %}
-FUNCTION f(
-  INTEGER a,
-  INTEGER b DEFAULT NULL,
-  INTEGER c,
-  INTEGER d DEFAULT NULL,
-  INTEGER e DEFAULT NULL) RETURNS INTEGER
-{% endhighlight %}
-
-All of the function's parameters have names, and parameters `b`, `d` and `e`
-have a default value of `NULL` and are therefore optional.
-(In Calcite, `NULL` is the only allowable default value for optional parameters;
-this may change
-[in future](https://issues.apache.org/jira/browse/CALCITE-947).)
-
-When calling a function with optional parameters,
-you can omit optional arguments at the end of the list, or use the `DEFAULT`
-keyword for any optional arguments.
-Here are some examples:
-
-* `f(1, 2, 3, 4, 5)` provides a value to each parameter, in order;
-* `f(1, 2, 3, 4)` omits `e`, which gets its default value, `NULL`;
-* `f(1, DEFAULT, 3)` omits `d` and `e`,
-  and specifies to use the default value of `b`;
-* `f(1, DEFAULT, 3, DEFAULT, DEFAULT)` has the same effect as the previous
-  example;
-* `f(1, 2)` is not legal, because `c` is not optional;
-* `f(1, 2, DEFAULT, 4)` is not legal, because `c` is not optional.
-
-You can specify arguments by name using the `=>` syntax.
-If one argument is named, they all must be.
-Arguments may be in any other, but must not specify any argument more than once,
-and you need to provide a value for every parameter which is not optional.
-Here are some examples:
-
-* `f(c => 3, d => 1, a => 0)` is equivalent to `f(0, NULL, 3, 1, NULL)`;
-* `f(c => 3, d => 1)` is not legal, because you have not specified a value for
-  `a` and `a` is not optional.
-
-### SQL Hints
-
-A hint is an instruction to the optimizer. When writing SQL, you may know information about
-the data unknown to the optimizer. Hints enable you to make decisions normally made by the optimizer.
-
-* Planner enforcers: there's no perfect planner, so it makes sense to implement hints to
-allow user better control the execution. For instance: "never merge this subquery with others" (`/*+ no_merge */`);
-“treat those tables as leading ones" (`/*+ leading */`) to affect join ordering, etc;
-* Append meta data/statistics: some statistics like “table index for scan” or “skew info of some shuffle keys”
-are somehow dynamic for the query, it would be very convenient to config them with hints because
-our planning metadata from the planner is very often not very accurate;
-* Operator resource constraints: for many cases, we would give a default resource configuration
-for the execution operators,
-i.e. min parallelism, memory (resource consuming UDF), special resource requirement (GPU or SSD disk) ...
-It would be very flexible to profile the resource with hints per query (not the Job).
-
-#### Syntax
-
-Calcite supports hints in two locations:
-
-* Query Hint: right after the `SELECT` keyword;
-* Table Hint: right after the referenced table name.
-
-For example:
-{% highlight sql %}
-SELECT /*+ hint1, hint2(a=1, b=2) */
-...
-FROM
-  tableName /*+ hint3(5, 'x') */
-JOIN
-  tableName /*+ hint4(c=id), hint5 */
-...
-{% endhighlight %}
-
-The syntax is as follows:
-
-{% highlight sql %}
-hintComment:
-      '/*+' hint [, hint ]* '*/'
-
-hint:
-      hintName
-  |   hintName '(' optionKey '=' optionVal [, optionKey '=' optionVal ]* ')'
-  |   hintName '(' hintOption [, hintOption ]* ')'
-
-optionKey:
-      simpleIdentifier
-  |   stringLiteral
-
-optionVal:
-      stringLiteral
-
-hintOption:
-      simpleIdentifier
-   |  numericLiteral
-   |  stringLiteral
-{% endhighlight %}
-
-It is experimental in Calcite, and yet not fully implemented, what we have implemented are:
-
-* The parser support for the syntax above;
-* `RelHint` to represent a hint item;
-* Mechanism to propagate the hints, during sql-to-rel conversion and planner planning.
-
-We do not add any builtin hint items yet, would introduce more if we think the hints is stable enough.
-
-### MATCH_RECOGNIZE
-
-`MATCH_RECOGNIZE` is a SQL extension for recognizing sequences of
-events in complex event processing (CEP).
-
-It is experimental in Calcite, and yet not fully implemented.
-
-#### Syntax
-
-{% highlight sql %}
-matchRecognize:
-      MATCH_RECOGNIZE '('
-      [ PARTITION BY expression [, expression ]* ]
-      [ ORDER BY orderItem [, orderItem ]* ]
-      [ MEASURES measureColumn [, measureColumn ]* ]
-      [ ONE ROW PER MATCH | ALL ROWS PER MATCH ]
-      [ AFTER MATCH skip ]
-      PATTERN '(' pattern ')'
-      [ WITHIN intervalLiteral ]
-      [ SUBSET subsetItem [, subsetItem ]* ]
-      DEFINE variable AS condition [, variable AS condition ]*
-      ')'
-
-skip:
-      SKIP TO NEXT ROW
-  |   SKIP PAST LAST ROW
-  |   SKIP TO FIRST variable
-  |   SKIP TO LAST variable
-  |   SKIP TO variable
-
-subsetItem:
-      variable = '(' variable [, variable ]* ')'
-
-measureColumn:
-      expression AS alias
-
-pattern:
-      patternTerm [ '|' patternTerm ]*
-
-patternTerm:
-      patternFactor [ patternFactor ]*
-
-patternFactor:
-      patternPrimary [ patternQuantifier ]
-
-patternPrimary:
-      variable
-  |   '$'
-  |   '^'
-  |   '(' [ pattern ] ')'
-  |   '{-' pattern '-}'
-  |   PERMUTE '(' pattern [, pattern ]* ')'
-
-patternQuantifier:
-      '*'
-  |   '*?'
-  |   '+'
-  |   '+?'
-  |   '?'
-  |   '??'
-  |   '{' { [ minRepeat ], [ maxRepeat ] } '}' ['?']
-  |   '{' repeat '}'
-
-intervalLiteral:
-      INTERVAL 'string' timeUnit [ TO timeUnit ]
-{% endhighlight %}
-
-In *patternQuantifier*, *repeat* is a positive integer,
-and *minRepeat* and *maxRepeat* are non-negative integers.
-
-### DDL Extensions
-
-DDL extensions are only available in the calcite-server module.
-To enable, include `calcite-server.jar` in your class path, and add
-`parserFactory=org.apache.calcite.sql.parser.ddl.SqlDdlParserImpl#FACTORY`
-to the JDBC connect string (see connect string property
-[parserFactory]({{ site.apiRoot }}/org/apache/calcite/config/CalciteConnectionProperty.html#PARSER_FACTORY)).
-
-{% highlight sql %}
-ddlStatement:
-      createSchemaStatement
-  |   createForeignSchemaStatement
-  |   createTableStatement
-  |   createViewStatement
-  |   createMaterializedViewStatement
-  |   createTypeStatement
-  |   createFunctionStatement
-  |   dropSchemaStatement
-  |   dropForeignSchemaStatement
-  |   dropTableStatement
-  |   dropViewStatement
-  |   dropMaterializedViewStatement
-  |   dropTypeStatement
-  |   dropFunctionStatement
-
-createSchemaStatement:
-      CREATE [ OR REPLACE ] SCHEMA [ IF NOT EXISTS ] name
-
-createForeignSchemaStatement:
-      CREATE [ OR REPLACE ] FOREIGN SCHEMA [ IF NOT EXISTS ] name
-      (
-          TYPE 'type'
-      |   LIBRARY 'com.example.calcite.ExampleSchemaFactory'
-      )
-      [ OPTIONS '(' option [, option ]* ')' ]
-
-option:
-      name literal
-
-createTableStatement:
-      CREATE TABLE [ IF NOT EXISTS ] name
-      [ '(' tableElement [, tableElement ]* ')' ]
-      [ AS query ]
-
-createTypeStatement:
-      CREATE [ OR REPLACE ] TYPE name AS
-      {
-          baseType
... 161 lines suppressed ...