You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2015/05/30 01:37:42 UTC
svn commit: r1682568 - in /incubator/calcite/site/docs: avatica.html
reference.html stream.html
Author: jhyde
Date: Fri May 29 23:37:42 2015
New Revision: 1682568
URL: http://svn.apache.org/r1682568
Log:
More formatting
Modified:
incubator/calcite/site/docs/avatica.html
incubator/calcite/site/docs/reference.html
incubator/calcite/site/docs/stream.html
Modified: incubator/calcite/site/docs/avatica.html
URL: http://svn.apache.org/viewvc/incubator/calcite/site/docs/avatica.html?rev=1682568&r1=1682567&r2=1682568&view=diff
==============================================================================
--- incubator/calcite/site/docs/avatica.html (original)
+++ incubator/calcite/site/docs/avatica.html Fri May 29 23:37:42 2015
@@ -610,13 +610,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
See the License for the specific language governing permissions and
limitations under the License.
-->
-<p>## Introduction</p>
-
<p>Avatica is a framework for building JDBC and ODBC drivers for databases,
and an RPC wire protocol.</p>
-<p>![Avatica Architecture]
-(https://raw.githubusercontent.com/julianhyde/share/master/slides/avatica-architecture.png)</p>
+<p><img src="https://raw.githubusercontent.com/julianhyde/share/master/slides/avatica-architecture.png" alt="Avatica Architecture" /></p>
<p>Avaticaâs Java binding has very few dependencies.
Even though it is part of Apache Calcite it does not depend on other parts of
Modified: incubator/calcite/site/docs/reference.html
URL: http://svn.apache.org/viewvc/incubator/calcite/site/docs/reference.html?rev=1682568&r1=1682567&r2=1682568&view=diff
==============================================================================
--- incubator/calcite/site/docs/reference.html (original)
+++ incubator/calcite/site/docs/reference.html Fri May 29 23:37:42 2015
@@ -610,7 +610,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
See the License for the specific language governing permissions and
limitations under the License.
-->
-<p>## SQL constructs</p>
+<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="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">BNF</a>-like
+form.</p>
<div class="highlight"><pre><code class="language-sql" data-lang="sql"><span class="k">statement</span><span class="p">:</span>
<span class="n">setStatement</span>
@@ -769,11 +774,11 @@ elements used in a SQL query.</p>
only contain letters, digits, and underscores. They are implicitly
converted to upper case.</p>
-<p>Quoted identifiers, such as âEmployee Nameâ, start and end with
+<p>Quoted identifiers, such as <code>"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:
-âAn employee called ââFredââ.â</p>
+<code>"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
@@ -788,106 +793,106 @@ name will have been converted to upper c
<table>
<thead>
<tr>
- <th>Data type</th>
- <th>Description</th>
- <th>Range and examples</th>
+ <th style="text-align: left">Data type</th>
+ <th style="text-align: left">Description</th>
+ <th style="text-align: left">Range and examples</th>
</tr>
</thead>
<tbody>
<tr>
- <td>BOOLEAN</td>
- <td>Logical values</td>
- <td>Values: TRUE, FALSE, UNKNOWN</td>
+ <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>TINYINT</td>
- <td>1 byte signed integer</td>
- <td>Range is -255 to 256</td>
+ <td style="text-align: left">TINYINT</td>
+ <td style="text-align: left">1 byte signed integer</td>
+ <td style="text-align: left">Range is -255 to 256</td>
</tr>
<tr>
- <td>SMALLINT</td>
- <td>2 byte signed integer</td>
- <td>Range is -32768 to 32767</td>
+ <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>INTEGER, INT</td>
- <td>4 byte signed integer</td>
- <td>Range is -2147483648 to 2147483647</td>
+ <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>BIGINT</td>
- <td>8 byte signed integer</td>
- <td>Range is -9223372036854775808 to 9223372036854775807</td>
+ <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>DECIMAL(p, s)</td>
- <td>Fixed point</td>
- <td>Example: 123.45 is a DECIMAL(5, 2) value.</td>
+ <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>NUMERIC</td>
- <td>Fixed point</td>
- <td>Â </td>
+ <td style="text-align: left">NUMERIC</td>
+ <td style="text-align: left">Fixed point</td>
+ <td style="text-align: left">Â </td>
</tr>
<tr>
- <td>REAL, FLOAT</td>
- <td>4 byte floating point</td>
- <td>6 decimal digits precision</td>
+ <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>DOUBLE</td>
- <td>8 byte floating point</td>
- <td>15 decimal digits precision</td>
+ <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>CHAR(n), CHARACTER(n)</td>
- <td>Fixed-width character string</td>
- <td>âHelloâ, ââ (empty string), _latin1âHelloâ, nâHelloâ, _UTF16âHelloâ, âHelloâ âthereâ (literal split into multiple parts)</td>
+ <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>VARCHAR(n), CHARACTER VARYING(n)</td>
- <td>Variable-length character string</td>
- <td>As CHAR(n)</td>
+ <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>BINARY(n)</td>
- <td>Fixed-width binary string</td>
- <td>xâ45F0ABâ, xââ (empty binary string), xâABâ âCDâ (multi-part binary string literal)</td>
+ <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>VARBINARY(n), BINARY VARYING(n)</td>
- <td>Variable-length binary string</td>
- <td>As BINARY(n)</td>
+ <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>DATE</td>
- <td>Date</td>
- <td>Example: DATE â1969-07-20â</td>
+ <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>TIME</td>
- <td>Time of day</td>
- <td>Example: TIME â20:17:40â</td>
+ <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>TIMESTAMP [ WITHOUT TIME ZONE ]</td>
- <td>Date and time</td>
- <td>Example: TIMESTAMP â1969-07-20 20:17:40â</td>
+ <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>TIMESTAMP WITH TIME ZONE</td>
- <td>Date and time with time zone</td>
- <td>Example: TIMESTAMP â1969-07-20 20:17:40 America/Los Angelesâ</td>
+ <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>INTERVAL timeUnit [ TO timeUnit ]</td>
- <td>Date time interval</td>
- <td>Examples: INTERVAL â1:5â YEAR TO MONTH, INTERVAL â45â DAY</td>
+ <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</td>
</tr>
<tr>
- <td>Anchored interval</td>
- <td>Date time interval</td>
- <td>Example: (DATE â1969-07-20â, DATE â1972-08-29â)</td>
+ <td style="text-align: left">Anchored interval</td>
+ <td style="text-align: left">Date time interval</td>
+ <td style="text-align: left">Example: (DATE â1969-07-20â, DATE â1972-08-29â)</td>
</tr>
</tbody>
</table>
@@ -910,34 +915,34 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Type</th>
- <th>Description</th>
+ <th style="text-align: left">Type</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>ANY</td>
- <td>A value of an unknown type</td>
+ <td style="text-align: left">ANY</td>
+ <td style="text-align: left">A value of an unknown type</td>
</tr>
<tr>
- <td>ROW</td>
- <td>Row with 1 or more columns</td>
+ <td style="text-align: left">ROW</td>
+ <td style="text-align: left">Row with 1 or more columns</td>
</tr>
<tr>
- <td>MAP</td>
- <td>Collection of keys mapped to values</td>
+ <td style="text-align: left">MAP</td>
+ <td style="text-align: left">Collection of keys mapped to values</td>
</tr>
<tr>
- <td>MULTISET</td>
- <td>Unordered collection that may contain duplicates</td>
+ <td style="text-align: left">MULTISET</td>
+ <td style="text-align: left">Unordered collection that may contain duplicates</td>
</tr>
<tr>
- <td>ARRAY</td>
- <td>Ordered, contiguous collection that may contain duplicates</td>
+ <td style="text-align: left">ARRAY</td>
+ <td style="text-align: left">Ordered, contiguous collection that may contain duplicates</td>
</tr>
<tr>
- <td>CURSOR</td>
- <td>Cursor over the result of executing a query</td>
+ <td style="text-align: left">CURSOR</td>
+ <td style="text-align: left">Cursor over the result of executing a query</td>
</tr>
</tbody>
</table>
@@ -949,94 +954,94 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>value1 = value2</td>
- <td>Equals</td>
+ <td style="text-align: left">value1 = value2</td>
+ <td style="text-align: left">Equals</td>
</tr>
<tr>
- <td>value1 <> value2</td>
- <td>Not equal</td>
+ <td style="text-align: left">value1 <> value2</td>
+ <td style="text-align: left">Not equal</td>
</tr>
<tr>
- <td>value1 > value2</td>
- <td>Greater than</td>
+ <td style="text-align: left">value1 > value2</td>
+ <td style="text-align: left">Greater than</td>
</tr>
<tr>
- <td>value1 >= value2</td>
- <td>Greater than or equal</td>
+ <td style="text-align: left">value1 >= value2</td>
+ <td style="text-align: left">Greater than or equal</td>
</tr>
<tr>
- <td>value1 < value2</td>
- <td>Less than</td>
+ <td style="text-align: left">value1 < value2</td>
+ <td style="text-align: left">Less than</td>
</tr>
<tr>
- <td>value1 <= value2</td>
- <td>Less than or equal</td>
+ <td style="text-align: left">value1 <= value2</td>
+ <td style="text-align: left">Less than or equal</td>
</tr>
<tr>
- <td>value IS NULL</td>
- <td>Whether <em>value</em> is null</td>
+ <td style="text-align: left">value IS NULL</td>
+ <td style="text-align: left">Whether <em>value</em> is null</td>
</tr>
<tr>
- <td>value IS NOT NULL</td>
- <td>Whether <em>value</em> is not null</td>
+ <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>value1 IS DISTINCT FROM value2</td>
- <td>Whether two values are not equal, treating null values as the same</td>
+ <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>value1 IS NOT DISTINCT FROM value2</td>
- <td>Whether two values are equal, treating null values as the same</td>
+ <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>value1 BETWEEN value2 AND value3</td>
- <td>Whether <em>value1</em> is greater than or equal to <em>value2</em> and less than or equal to <em>value3</em></td>
+ <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>value1 NOT BETWEEN value2 AND value3</td>
- <td>Whether <em>value1</em> is less than <em>value2</em> or greater than <em>value3</em></td>
+ <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>string1 LIKE string2 [ ESCAPE string3 ]</td>
- <td>Whether <em>string1</em> matches pattern <em>string2</em></td>
+ <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>string1 NOT LIKE string2 [ ESCAPE string3 ]</td>
- <td>Whether <em>string1</em> does not match pattern <em>string2</em></td>
+ <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>string1 SIMILAR TO string2 [ ESCAPE string3 ]</td>
- <td>Whether <em>string1</em> matches regular expression <em>string2</em></td>
+ <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>string1 NOT SIMILAR TO string2 [ ESCAPE string3 ]</td>
- <td>Whether <em>string1</em> does not match regular expression <em>string2</em></td>
+ <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>value IN (value [, value]* )</td>
- <td>Whether <em>value</em> is equal to a value in a list</td>
+ <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>value NOT IN (value [, value]* )</td>
- <td>Whether <em>value</em> is not equal to every value in a list</td>
+ <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>value IN (sub-query)</td>
- <td>Whether <em>value</em> is equal to a row returned by <em>sub-query</em></td>
+ <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>value NOT IN (sub-query)</td>
- <td>Whether <em>value</em> is not equal to every row returned by <em>sub-query</em></td>
+ <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>EXISTS (sub-query)</td>
- <td>Whether <em>sub-query</em> returns at least one row</td>
+ <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>
</tbody>
</table>
@@ -1046,46 +1051,46 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>boolean1 OR boolean2</td>
- <td>Whether <em>boolean1</em> is TRUE or <em>boolean2</em> is TRUE</td>
+ <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>boolean1 AND boolean2</td>
- <td>Whether <em>boolean1</em> and <em>boolean2</em> are both TRUE</td>
+ <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>NOT boolean</td>
- <td>Whether <em>boolean</em> is not TRUE; returns UNKNOWN if <em>boolean</em> is UNKNOWN</td>
+ <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>boolean IS FALSE</td>
- <td>Whether <em>boolean</em> is FALSE; returns FALSE if <em>boolean</em> is UNKNOWN</td>
+ <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>boolean IS NOT FALSE</td>
- <td>Whether <em>boolean</em> is not FALSE; returns TRUE if <em>boolean</em> is UNKNOWN</td>
+ <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>boolean IS TRUE</td>
- <td>Whether <em>boolean</em> is TRUE; returns FALSE if <em>boolean</em> is UNKNOWN</td>
+ <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>boolean IS NOT TRUE</td>
- <td>Whether <em>boolean</em> is not TRUE; returns TRUE if <em>boolean</em> is UNKNOWN</td>
+ <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>boolean IS UNKNOWN</td>
- <td>Whether <em>boolean</em> is UNKNOWN</td>
+ <td style="text-align: left">boolean IS UNKNOWN</td>
+ <td style="text-align: left">Whether <em>boolean</em> is UNKNOWN</td>
</tr>
<tr>
- <td>boolean IS NOT UNKNOWN</td>
- <td>Whether <em>boolean</em> is not UNKNOWN</td>
+ <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>
@@ -1095,70 +1100,70 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>+ numeric</td>
- <td>Returns <em>numeric</em></td>
+ <td style="text-align: left">+ numeric</td>
+ <td style="text-align: left">Returns <em>numeric</em></td>
</tr>
<tr>
- <td>- numeric</td>
- <td>Returns negative <em>numeric</em></td>
+ <td style="text-align: left">:- numeric</td>
+ <td style="text-align: left">Returns negative <em>numeric</em></td>
</tr>
<tr>
- <td>numeric1 + numeric2</td>
- <td>Returns <em>numeric1</em> plus <em>numeric2</em></td>
+ <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>numeric1 - numeric2</td>
- <td>Returns <em>numeric1</em> minus <em>numeric2</em></td>
+ <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>numeric1 * numeric2</td>
- <td>Returns <em>numeric1</em> multiplied by <em>numeric2</em></td>
+ <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>numeric1 / numeric2</td>
- <td>Returns <em>numeric1</em> divided by <em>numeric2</em></td>
+ <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>POWER(numeric1, numeric2)</td>
- <td>Returns <em>numeric1</em> raised to the power of <em>numeric2</em></td>
+ <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>ABS(numeric)</td>
- <td>Returns the absolute value of <em>numeric</em></td>
+ <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>MOD(numeric, numeric)</td>
- <td>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>
+ <td style="text-align: left">MOD(numeric, numeric)</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>SQRT(numeric)</td>
- <td>Returns the square root of <em>numeric</em></td>
+ <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>LN(numeric)</td>
- <td>Returns the natural logarithm (base <em>e</em>) of <em>numeric</em></td>
+ <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>LOG10(numeric)</td>
- <td>Returns the base 10 logarithm of <em>numeric</em></td>
+ <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>EXP(numeric)</td>
- <td>Returns <em>e</em> raised to the power of <em>numeric</em></td>
+ <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>CEIL(numeric)</td>
- <td>Rounds <em>numeric</em> up, and returns the smallest number that is greater than or equal to <em>numeric</em></td>
+ <td style="text-align: left">CEIL(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>FLOOR(numeric)</td>
- <td>Rounds <em>numeric</em> down, and returns the largest number that is less than or equal to <em>numeric</em></td>
+ <td style="text-align: left">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>
</tbody>
</table>
@@ -1168,54 +1173,54 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>string || string</td>
- <td>Concatenates two character strings.</td>
+ <td style="text-align: left">string || string</td>
+ <td style="text-align: left">Concatenates two character strings.</td>
</tr>
<tr>
- <td>CHAR_LENGTH(string)</td>
- <td>Returns the number of characters in a character string</td>
+ <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>CHARACTER_LENGTH(string)</td>
- <td>As CHAR_LENGTH(<em>string</em>)</td>
+ <td style="text-align: left">CHARACTER_LENGTH(string)</td>
+ <td style="text-align: left">As CHAR_LENGTH(<em>string</em>)</td>
</tr>
<tr>
- <td>UPPER(string)</td>
- <td>Returns a character string converted to upper case</td>
+ <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>LOWER(string)</td>
- <td>Returns a character string converted to lower case</td>
+ <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>POSITION(string1 IN string2)</td>
- <td>Returns the position of the first occurrence of <em>string1</em> in <em>string2</em></td>
+ <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>TRIM( { BOTH | LEADING | TRAILING } string1 FROM string2)</td>
- <td>Removes the longest string containing only the characters in <em>string1</em> from the start/end/both ends of <em>string1</em></td>
+ <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>OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ])</td>
- <td>Replaces a substring of <em>string1</em> with <em>string2</em></td>
+ <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>SUBSTRING(string FROM integer)</td>
- <td>Returns a substring of a character string starting at a given point.</td>
+ <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>SUBSTRING(string FROM integer FOR integer)</td>
- <td>Returns a substring of a character string starting at a given point with a given length.</td>
+ <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>INITCAP(string)</td>
- <td>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>
+ <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>
@@ -1231,30 +1236,30 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>binary || binary</td>
- <td>Concatenates two binary strings.</td>
+ <td style="text-align: left">binary || binary</td>
+ <td style="text-align: left">Concatenates two binary strings.</td>
</tr>
<tr>
- <td>POSITION(binary1 IN binary2)</td>
- <td>Returns the position of the first occurrence of <em>binary1</em> in <em>binary2</em></td>
+ <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>OVERLAY(binary1 PLACING binary2 FROM integer [ FOR integer2 ])</td>
- <td>Replaces a substring of <em>binary1</em> with <em>binary2</em></td>
+ <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>SUBSTRING(binary FROM integer)</td>
- <td>Returns a substring of <em>binary</em> starting at a given point</td>
+ <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>SUBSTRING(binary FROM integer FOR integer)</td>
- <td>Returns a substring of <em>binary</em> starting at a given point with a given length</td>
+ <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>
@@ -1264,50 +1269,50 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>LOCALTIME</td>
- <td>Returns the current date and time in the session time zone in a value of datatype TIME</td>
+ <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>LOCALTIME(precision)</td>
- <td>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>
+ <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>LOCALTIMESTAMP</td>
- <td>Returns the current date and time in the session time zone in a value of datatype TIMESTAMP</td>
+ <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>LOCALTIMESTAMP(precision)</td>
- <td>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>
+ <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>CURRENT_TIME</td>
- <td>Returns the current time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE</td>
+ <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>CURRENT_DATE</td>
- <td>Returns the current date in the session time zone, in a value of datatype DATE</td>
+ <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>CURRENT_TIMESTAMP</td>
- <td>Returns the current date and time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE</td>
+ <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>EXTRACT(timeUnit FROM datetime)</td>
- <td>Extracts and returns the value of a specified datetime field from a datetime value expression</td>
+ <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>FLOOR(datetime TO timeUnit)</td>
- <td>Rounds <em>datetime</em> down to <em>timeUnit</em></td>
+ <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>CEIL(datetime TO timeUnit)</td>
- <td>Rounds <em>datetime</em> up to <em>timeUnit</em></td>
+ <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>
</tbody>
</table>
@@ -1320,16 +1325,8 @@ the user or application to supply a time
<li>FLOOR(interval)</li>
<li>datetime - datetime timeUnit [ TO timeUnit ]</li>
<li>interval OVERLAPS interval</li>
- <li>
- <ul>
- <li>interval</li>
- </ul>
- </li>
- <li>
- <ul>
- <li>interval</li>
- </ul>
- </li>
+ <li>+ interval</li>
+ <li>- interval</li>
<li>interval + interval</li>
<li>interval - interval</li>
<li>interval / interval</li>
@@ -1342,34 +1339,34 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>USER</td>
- <td>Equivalent to CURRENT_USER</td>
+ <td style="text-align: left">USER</td>
+ <td style="text-align: left">Equivalent to CURRENT_USER</td>
</tr>
<tr>
- <td>CURRENT_USER</td>
- <td>User name of current execution context</td>
+ <td style="text-align: left">CURRENT_USER</td>
+ <td style="text-align: left">User name of current execution context</td>
</tr>
<tr>
- <td>SESSION_USER</td>
- <td>Session user name</td>
+ <td style="text-align: left">SESSION_USER</td>
+ <td style="text-align: left">Session user name</td>
</tr>
<tr>
- <td>SYSTEM_USER</td>
- <td>Returns the name of the current data store user as identified by the operating system</td>
+ <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>CURRENT_PATH</td>
- <td>Returns a character string representing the current lookup scope for references to user-defined routines and types</td>
+ <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>CURRENT_ROLE</td>
- <td>Returns the current active role</td>
+ <td style="text-align: left">CURRENT_ROLE</td>
+ <td style="text-align: left">Returns the current active role</td>
</tr>
</tbody>
</table>
@@ -1379,26 +1376,26 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>CASE value<br />WHEN value1 [, value11 ]* THEN result1<br />[ WHEN valueN [, valueN1 ]* THEN resultN ]*<br />[ ELSE resultZ ]<br /> END</td>
- <td>Simple case</td>
+ <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>CASE<br />WHEN condition1 THEN result1<br />[ WHEN conditionN THEN resultN ]*<br />[ ELSE resultZ ]<br />END</td>
- <td>Searched case</td>
+ <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>NULLIF(value, value)</td>
- <td>Returns NULL if the values are the same. For example, <code>NULLIF(5, 5)</code> returns NULL; <code>NULLIF(5, 0)</code> returns 5.</td>
+ <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>COALESCE(value, value [, value]* )</td>
- <td>Provides a value if the first value is null. For example, <code>COALESCE(NULL, 5)</code> returns 5.</td>
+ <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>
@@ -1408,14 +1405,14 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>CAST(value AS type)</td>
- <td>Converts a value to a given type.</td>
+ <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>
@@ -1425,34 +1422,34 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>ROW (value [, value]* )</td>
- <td>Creates a row from a list of values.</td>
+ <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>(value [, value]* )</td>
- <td>Creates a row from a list of values.</td>
+ <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>map [ key ]</td>
- <td>Returns the element of a map with a particular key.</td>
+ <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>array [ index ]</td>
- <td>Returns the element at a particular location in an array.</td>
+ <td style="text-align: left">array [ index ]</td>
+ <td style="text-align: left">Returns the element at a particular location in an array.</td>
</tr>
<tr>
- <td>ARRAY [ value [, value ]* ]</td>
- <td>Creates an array from a list of values.</td>
+ <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>MAP [ key, value [, key, value ]* ]</td>
- <td>Creates a map from a list of key-value pairs.</td>
+ <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>
@@ -1462,18 +1459,18 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>ELEMENT(value)</td>
- <td>Returns the sole element of a array or multiset; null if the collection is empty; throws if it has more than one element.</td>
+ <td style="text-align: left">ELEMENT(value)</td>
+ <td style="text-align: left">Returns the sole element of a array or multiset; null if the collection is empty; throws if it has more than one element.</td>
</tr>
<tr>
- <td>CARDINALITY(value)</td>
- <td>Returns the number of elements in an array or multiset.</td>
+ <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>
</tbody>
</table>
@@ -1487,18 +1484,18 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>{fn LOG10(numeric)}</td>
- <td>Returns the base-10 logarithm of <em>numeric</em></td>
+ <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>{fn POWER(numeric1, numeric2)}</td>
- <td>Returns <em>numeric1</em> raised to the power of <em>numeric2</em></td>
+ <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>
</tbody>
</table>
@@ -1535,22 +1532,22 @@ the user or application to supply a time
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>{fn LOCATE(string1, string2)}</td>
- <td>Returns the position in <em>string2</em> of the first occurrence of <em>string1</em>. Searches from the beginning of the second CharacterExpression, unless the startIndex parameter is specified.</td>
+ <td style="text-align: left">{fn LOCATE(string1, string2)}</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 the second CharacterExpression, unless the startIndex parameter is specified.</td>
</tr>
<tr>
- <td>{fn INSERT(string1, start, length, string2)}</td>
- <td>Inserts <em>string2</em> into a slot in <em>string1</em></td>
+ <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>{fn LCASE(string)}</td>
- <td>Returns a string in which all alphabetic characters in <em>string</em> have been converted to lower case</td>
+ <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>
</tbody>
</table>
@@ -1628,66 +1625,66 @@ passed to the aggregate function.</p>
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>COUNT( [ DISTINCT ] value [, value]* )</td>
- <td>Returns the number of input rows for which <em>value</em> is not null (wholly not null if <em>value</em> is composite)</td>
+ <td style="text-align: left">COUNT( [ 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>COUNT(*)</td>
- <td>Returns the number of input rows</td>
+ <td style="text-align: left">COUNT(*)</td>
+ <td style="text-align: left">Returns the number of input rows</td>
</tr>
<tr>
- <td>AVG( [ DISTINCT ] numeric)</td>
- <td>Returns the average (arithmetic mean) of <em>numeric</em> across all input values</td>
+ <td style="text-align: left">AVG( [ 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>SUM( [ DISTINCT ] numeric)</td>
- <td>Returns the sum of <em>numeric</em> across all input values</td>
+ <td style="text-align: left">SUM( [ DISTINCT ] numeric)</td>
+ <td style="text-align: left">Returns the sum of <em>numeric</em> across all input values</td>
</tr>
<tr>
- <td>MAX( [ DISTINCT ] value)</td>
- <td>Returns the maximum value of <em>value</em> across all input values</td>
+ <td style="text-align: left">MAX( [ DISTINCT ] value)</td>
+ <td style="text-align: left">Returns the maximum value of <em>value</em> across all input values</td>
</tr>
<tr>
- <td>MIN( [ DISTINCT ] value)</td>
- <td>Returns the minimum value of <em>value</em> across all input values</td>
+ <td style="text-align: left">MIN( [ DISTINCT ] value)</td>
+ <td style="text-align: left">Returns the minimum value of <em>value</em> across all input values</td>
</tr>
<tr>
- <td>STDDEV_POP( [ DISTINCT ] numeric)</td>
- <td>Returns the population standard deviation of <em>numeric</em> across all input values</td>
+ <td style="text-align: left">STDDEV_POP( [ 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>STDDEV_SAMP( [ DISTINCT ] numeric)</td>
- <td>Returns the sample standard deviation of <em>numeric</em> across all input values</td>
+ <td style="text-align: left">STDDEV_SAMP( [ 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>VAR_POP( [ DISTINCT ] value)</td>
- <td>Returns the population variance (square of the population standard deviation) of <em>numeric</em> across all input values</td>
+ <td style="text-align: left">VAR_POP( [ 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>VAR_SAMP( [ DISTINCT ] numeric)</td>
- <td>Returns the sample variance (square of the sample standard deviation) of <em>numeric</em> across all input values</td>
+ <td style="text-align: left">VAR_SAMP( [ 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>
<tr>
- <td>COVAR_POP(numeric1, numeric2)</td>
- <td>Returns the population covariance of the pair (<em>numeric1</em>, <em>numeric2</em>) across all input values</td>
+ <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>COVAR_SAMP(numeric1, numeric2)</td>
- <td>Returns the sample covariance of the pair (<em>numeric1</em>, <em>numeric2</em>) across all input values</td>
+ <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>REGR_SXX(numeric1, numeric2)</td>
- <td>Returns the sum of squares of the dependent expression in a linear regression model</td>
+ <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>REGR_SYY(numeric1, numeric2)</td>
- <td>Returns the sum of squares of the independent expression in a linear regression model</td>
+ <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>
</tbody>
</table>
@@ -1709,66 +1706,66 @@ passed to the aggregate function.</p>
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>COUNT(value [, value ]* ) OVER window</td>
- <td>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>
+ <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>COUNT(*) OVER window</td>
- <td>Returns the number of rows in <em>window</em></td>
+ <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>AVG(numeric) OVER window</td>
- <td>Returns the average (arithmetic mean) of <em>numeric</em> across all values in <em>window</em></td>
+ <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>SUM(numeric) OVER window</td>
- <td>Returns the sum of <em>numeric</em> across all values in <em>window</em></td>
+ <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>MAX(value) OVER window</td>
- <td>Returns the maximum value of <em>value</em> across all values in <em>window</em></td>
+ <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>MIN(value) OVER window</td>
- <td>Returns the minimum value of <em>value</em> across all values in <em>window</em></td>
+ <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>RANK() OVER window</td>
- <td>Returns the rank of the current row with gaps; same as ROW_NUMBER of its first peer</td>
+ <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>DENSE_RANK() OVER window</td>
- <td>Returns the rank of the current row without gaps; this function counts peer groups</td>
+ <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>ROW_NUMBER() OVER window</td>
- <td>Returns the number of the current row within its partition, counting from 1</td>
+ <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>FIRST_VALUE(value) OVER window</td>
- <td>Returns <em>value</em> evaluated at the row that is the first row of the window frame</td>
+ <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>LAST_VALUE(value) OVER window</td>
- <td>Returns <em>value</em> evaluated at the row that is the last row of the window frame</td>
+ <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>LEAD(value, offset, default) OVER window</td>
- <td>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>
+ <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>LAG(value, offset, default) OVER window</td>
- <td>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>
+ <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>NTILE(value) OVER window</td>
- <td>Returns an integer ranging from 1 to <em>value</em>, dividing the partition as equally as possible</td>
+ <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>
@@ -1789,22 +1786,22 @@ passed to the aggregate function.</p>
<table>
<thead>
<tr>
- <th>Operator syntax</th>
- <th>Description</th>
+ <th style="text-align: left">Operator syntax</th>
+ <th style="text-align: left">Description</th>
</tr>
</thead>
<tbody>
<tr>
- <td>GROUPING(expression)</td>
- <td>Returns 1 if expression is rolled up in the current rowâs grouping set, 0 otherwise</td>
+ <td style="text-align: left">GROUPING(expression)</td>
+ <td style="text-align: left">Returns 1 if expression is rolled up in the current rowâs grouping set, 0 otherwise</td>
</tr>
<tr>
- <td>GROUP_ID()</td>
- <td>Returns an integer that uniquely identifies the combination of grouping keys</td>
+ <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>GROUPING_ID(expression [, expression ] * )</td>
- <td>Returns a bit vector of the given grouping expressions</td>
+ <td style="text-align: left">GROUPING_ID(expression [, expression ] * )</td>
+ <td style="text-align: left">Returns a bit vector of the given grouping expressions</td>
</tr>
</tbody>
</table>
Modified: incubator/calcite/site/docs/stream.html
URL: http://svn.apache.org/viewvc/incubator/calcite/site/docs/stream.html?rev=1682568&r1=1682567&r2=1682568&view=diff
==============================================================================
--- incubator/calcite/site/docs/stream.html (original)
+++ incubator/calcite/site/docs/stream.html Fri May 29 23:37:42 2015
@@ -627,23 +627,29 @@ based on relational algebra, validated a
to take advantage of available resources and algorithms.</p>
<p>Calciteâs SQL is an extension to standard SQL, not another âSQL-likeâ language.
-The distinction is important, for several reasons:
-* Streaming SQL is easy to learn for anyone who knows regular SQL.
-* The semantics are clear, because we aim to produce the same results on a
- stream as if the same data were in a table.
-* You can write queries that combine streams and tables (or the history of
- a stream, which is basically an in-memory table).
-* Lots of existing tools can generate standard SQL.</p>
+The distinction is important, for several reasons:</p>
+
+<ul>
+ <li>Streaming SQL is easy to learn for anyone who knows regular SQL.</li>
+ <li>The semantics are clear, because we aim to produce the same results on a
+stream as if the same data were in a table.</li>
+ <li>You can write queries that combine streams and tables (or the history of
+a stream, which is basically an in-memory table).</li>
+ <li>Lots of existing tools can generate standard SQL.</li>
+</ul>
<p>If you donât use the <code>STREAM</code> keyword, you are back in regular
standard SQL.</p>
<h2 id="an-example-schema">An example schema</h2>
-<p>Our streaming SQL examples use the following schema:
-* <code>Orders (rowtime, productId, orderId, units)</code> - a stream and a table
-* <code>Products (rowtime, productId, name)</code> - a table
-* <code>Shipments (rowtime, orderId)</code> - a stream</p>
+<p>Our streaming SQL examples use the following schema:</p>
+
+<ul>
+ <li><code>Orders (rowtime, productId, orderId, units)</code> - a stream and a table</li>
+ <li><code>Products (rowtime, productId, name)</code> - a table</li>
+ <li><code>Shipments (rowtime, orderId)</code> - a stream</li>
+</ul>
<h2 id="a-simple-query">A simple query</h2>
@@ -743,11 +749,14 @@ possible to do advanced calculations lat
<h1 id="tumbling-windows">Tumbling windows</h1>
<p>There are several ways to compute aggregate functions on streams. The
-differences are:
-* How many rows come out for each row in?
-* Does each incoming value appear in one total, or more?
-* What defines the âwindowâ, the set of rows that contribute to a given output row?
-* Is the result a stream or a relation?</p>
+differences are:</p>
+
+<ul>
+ <li>How many rows come out for each row in?</li>
+ <li>Does each incoming value appear in one total, or more?</li>
+ <li>What defines the âwindowâ, the set of rows that contribute to a given output row?</li>
+ <li>Is the result a stream or a relation?</li>
+</ul>
<p>First weâll look a <em>tumbling window</em>, which is defined by a streaming
<code>GROUP BY</code>. Here is an example:</p>
@@ -862,8 +871,9 @@ possible:</p>
<span class="mi">11</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">00</span> <span class="o">|</span> <span class="mi">40</span></code></pre></div>
<p>Sub-queries in the <code>FROM</code> clause are sometimes referred to as âinline viewsâ,
-but really, nested queries are more fundamental. Views are just a convenient
-way to carve your SQL into manageable chunks.</p>
+but really, they are more fundamental than views. Views are just a convenient
+way to carve your SQL into manageable chunks by giving the pieces names and
+storing them in the metadata repository.</p>
<p>Many people find that nested queries and views are even more useful on streams
than they are on relations. Streaming queries are pipelines of
@@ -1111,11 +1121,14 @@ maintaining two tables, and adding and r
with FIFO queues. But you can access those tables without introducing a join
into the query.</p>
-<p>Some other features of the windowed aggregation syntax:
-* You can define windows based on row count.
-* The window can reference rows that have not yet arrived.
- (The stream will wait until they have arrived).
-* You can compute order-dependent functions such as <code>RANK</code> and median.</p>
+<p>Some other features of the windowed aggregation syntax:</p>
+
+<ul>
+ <li>You can define windows based on row count.</li>
+ <li>The window can reference rows that have not yet arrived.
+(The stream will wait until they have arrived).</li>
+ <li>You can compute order-dependent functions such as <code>RANK</code> and median.</li>
+</ul>
<h2 id="cascading-windows">Cascading windows</h2>
@@ -1179,7 +1192,10 @@ to run the query.</li>
<li>Windowed aggregation</li>
<li>Punctuation</li>
<li>Stream-to-table join
-** Stream-to-table join where table is changing</li>
+ <ul>
+ <li>Stream-to-table join where table is changing</li>
+ </ul>
+ </li>
<li>Stream-to-stream join</li>
<li>Relational queries on streams (e.g. âpie chartâ query)</li>
<li>Diagrams for various window types</li>