This is an automated email from the ASF dual-hosted git repository.
asf-ci-deploy 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 ae9c2bc3e Website deployed from
calcite@4699f02616a5dd0e5ebf695b0e0f2eccdd2568c7
ae9c2bc3e is described below
commit ae9c2bc3e1fae9696d6c25df4af0a959b479d649
Author: libenchao <[email protected]>
AuthorDate: Fri Nov 10 13:29:35 2023 +0000
Website deployed from calcite@4699f02616a5dd0e5ebf695b0e0f2eccdd2568c7
---
docs/algebra.html | 8 +-
docs/history.html | 317 +++++++++++++++++++++++++++++++++++++++++++++--
docs/howto.html | 4 +-
docs/innodb_adapter.html | 6 +-
docs/reference.html | 232 ++++++++++++++++++++++++++++------
5 files changed, 511 insertions(+), 56 deletions(-)
diff --git a/docs/algebra.html b/docs/algebra.html
index 1bfc13255..a6dfe83e4 100644
--- a/docs/algebra.html
+++ b/docs/algebra.html
@@ -339,10 +339,6 @@ A SQL recursive query, e.g. this one that generates the
sequence 1, 2, 3, …10:
LogicalFilter(condition=[<($0, 10)])
LogicalTableScan(table=[[aux]])</code></pre></figure>
-<p>Note that there is no support for recursive queries in the SQL layer yet
-(<a href="https://issues.apache.org/jira/browse/CALCITE-129">CALCITE-129</a>);
-the <code class="language-plaintext highlighter-rouge">WITH RECURSIVE</code>
query above is only for illustrative purposes.</p>
-
<h3 id="api-summary">API summary</h3>
<h4 id="relational-operators">Relational operators</h4>
@@ -490,6 +486,10 @@ return the <code class="language-plaintext
highlighter-rouge">RelBuilder</code>.
<td style="text-align: left"><code class="language-plaintext
highlighter-rouge">repeatUnion(tableName, all [, n])</code></td>
<td style="text-align: left">Creates a <a
href="/javadocAggregate/org/apache/calcite/rel/core/RepeatUnion.html">RepeatUnion</a>
associated to a <a
href="/javadocAggregate/org/apache/calcite/schema/TransientTable.html">TransientTable</a>
of the two most recent relational expressions, with <code
class="language-plaintext highlighter-rouge">n</code> maximum number of
iterations (default -1, i.e. no limit).</td>
</tr>
+ <tr>
+ <td style="text-align: left"><code class="language-plaintext
highlighter-rouge">sample(bernoulli, rate [, repeatableSeed])</code></td>
+ <td style="text-align: left">Creates a <a
href="/javadocAggregate/org/apache/calcite/rel/core/Sample.html">sample</a> of
at given sampling rate.</td>
+ </tr>
<tr>
<td style="text-align: left"><code class="language-plaintext
highlighter-rouge">snapshot(period)</code></td>
<td style="text-align: left">Creates a <a
href="/javadocAggregate/org/apache/calcite/rel/core/Snapshot.html">Snapshot</a>
of the given snapshot period.</td>
diff --git a/docs/history.html b/docs/history.html
index 8373ba79d..72021e81d 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -84,10 +84,10 @@ Downloads are available on the
<a href="/downloads/">downloads page</a>.</p>
<!--
-## <a
href="https://github.com/apache/calcite/releases/tag/calcite-1.36.0">1.36.0</a>
/ XXXX-XX-XX
-{: #v1-36-0}
+## <a
href="https://github.com/apache/calcite/releases/tag/calcite-1.37.0">1.37.0</a>
/ XXXX-XX-XX
+{: #v1-37-0}
-This release comes x months after [1.35.0](#v1-35-0),
+This release comes x months after [1.36.0](#v1-36-0),
contains contributions from x contributors, and resolves x issues.
Contributors to this release:
@@ -179,19 +179,320 @@ zoovwang.</p>
<p>Compatibility: This release is tested on Linux, macOS, Microsoft Windows;
using JDK/OpenJDK versions 8 to 19;
-Guava versions 16.0.1 to 31.1-jre;
+Guava versions 21.0 to 32.1.3-jre;
other software versions as specified in gradle.properties.</p>
<h4 id="new-features-1-36-0">New features</h4>
+<ul>
+ <li>Supporting new SQL functions in BigQuery, Hive and Spark libraries:
+ <ul>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5826">CALCITE-5826</a>]
+ Add <code class="language-plaintext highlighter-rouge">FIND_IN_SET</code>
function (enabled in Hive and Spark libraries)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5979">CALCITE-5979</a>]
+ Enable <code class="language-plaintext
highlighter-rouge">REGEXP_REPLACE</code> function in BigQuery library</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6077">CALCITE-6077</a>]
+ Add <code class="language-plaintext highlighter-rouge">FACTORIAL</code>
function (enabled in Hive and Spark libraries)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5918">CALCITE-5918</a>]
+ Add <code class="language-plaintext highlighter-rouge">MAP</code> function
(enabled in Spark library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5825">CALCITE-5825</a>]
+ Add <code class="language-plaintext highlighter-rouge">URL_ENCODE</code> and
<code class="language-plaintext highlighter-rouge">URL_DECODE</code> function
(enabled in Spark library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6021">CALCITE-6021</a>]
+ Add <code class="language-plaintext
highlighter-rouge">CURRENT_DATETIME</code> function (enabled in BigQuery
library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5993">CALCITE-5993</a>]
+ Add <code class="language-plaintext
highlighter-rouge">CODE_POINTS_TO_STRING</code>, <code
class="language-plaintext highlighter-rouge">TO_CODE_POINTS</code> function
(enabled in BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5978">CALCITE-5978</a>]
+ Add <code class="language-plaintext highlighter-rouge">REGEXP_INSTR</code>
function (enabled in BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5935">CALCITE-5935</a>]
+ Add <code class="language-plaintext
highlighter-rouge">CODE_POINTS_TO_BYTES</code> function (enabled in BigQuery
library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5933">CALCITE-5933</a>]
+ Add <code class="language-plaintext highlighter-rouge">SAFE_DIVIDE</code>
function (enabled in BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5821">CALCITE-5821</a>]
+ Add <code class="language-plaintext highlighter-rouge">FORMAT_NUMBER</code>
function (enabled in Hive and Spark library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5911">CALCITE-5911</a>]
+ Add <code class="language-plaintext
highlighter-rouge">REGEXP_EXTRACT_ALL</code> function (enabled in BigQuery
library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5910">CALCITE-5910</a>]
+ Add <code class="language-plaintext highlighter-rouge">REGEXP_EXTRACT</code>
and <code class="language-plaintext highlighter-rouge">REGEXP_SUBSTR</code>
functions (enabled in BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5766">CALCITE-5766</a>]
+ Add <code class="language-plaintext highlighter-rouge">SAFE_NEGATE</code>
function (enabled for BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5770">CALCITE-5770</a>]
+ Add <code class="language-plaintext highlighter-rouge">SAFE_SUBTRACT</code>
function (enabled in BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5848">CALCITE-5848</a>]
+ Add <code class="language-plaintext highlighter-rouge">BIT_GET</code> and
<code class="language-plaintext highlighter-rouge">GETBIT</code> functions
(enabled in Spark library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5644">CALCITE-5644</a>]
+ Add <code class="language-plaintext
highlighter-rouge">CONTAINS_SUBSTR</code> function (enabled in BigQuery
library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5640">CALCITE-5640</a>]
+ Add <code class="language-plaintext highlighter-rouge">SAFE_ADD</code>
function (enabled in BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5830">CALCITE-5830</a>]
+ Add <code class="language-plaintext highlighter-rouge">ARRAY_INSERT</code>
function(enabled in Spark library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5873">CALCITE-5873</a>]
+ Add <code class="language-plaintext
highlighter-rouge">REGEXP_CONTAINS</code> function (enabled in BigQuery
library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5827">CALCITE-5827</a>]
+ Add <code class="language-plaintext highlighter-rouge">IS_INF</code> and
<code class="language-plaintext highlighter-rouge">IS_NAN</code> functions
(enabled in BigQuery library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5831">CALCITE-5831</a>]
+ Add <code class="language-plaintext highlighter-rouge">SOUNDEX</code>
function (enabled in Spark library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5735">CALCITE-5735</a>]
+ Add <code class="language-plaintext highlighter-rouge">SAFE_MULTIPLY</code>
function (enabled for BigQuery)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5820">CALCITE-5820</a>]
+ Add <code class="language-plaintext highlighter-rouge">PARSE_URL</code>
function (enabled in Hive and Spark library)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5851">CALCITE-5851</a>]
+ Add <code class="language-plaintext highlighter-rouge">LEVENSHTEIN</code>
function (enabled in Hive and Spark library)</li>
+ </ul>
+ </li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-129">CALCITE-129</a>]
+ Support recursive <code class="language-plaintext
highlighter-rouge">WITH</code> queries</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6011">CALCITE-6011</a>]
+ Add <code class="language-plaintext
highlighter-rouge">FilterWindowTransposeRule</code> to push a <code
class="language-plaintext highlighter-rouge">Filter</code> past a <code
class="language-plaintext highlighter-rouge">Window</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6038">CALCITE-6038</a>]
+ Remove <code class="language-plaintext highlighter-rouge">ORDER BY ... LIMIT
n</code> when input has at most one row, n >= 1, and there is no <code
class="language-plaintext highlighter-rouge">OFFSET</code> clause</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6022">CALCITE-6022</a>]
+ Support <code class="language-plaintext highlighter-rouge">CREATE TABLE ...
LIKE DDL</code> in server module</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6031">CALCITE-6031</a>]
+ Add the planner rule that pushes <code class="language-plaintext
highlighter-rouge">Filter</code> past <code class="language-plaintext
highlighter-rouge">Sample</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-4189">CALCITE-4189</a>]
+ Simplify <code class="language-plaintext highlighter-rouge">p OR (p IS NOT
TRUE)</code> to <code class="language-plaintext highlighter-rouge">TRUE</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6009">CALCITE-6009</a>]
+ Add optimization to remove redundant <code class="language-plaintext
highlighter-rouge">LIMIT</code> that is more than input row count</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5570">CALCITE-5570</a>]
+ Support nested map type for <code class="language-plaintext
highlighter-rouge">SqlDataTypeSpec</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5962">CALCITE-5962</a>]
+ Support parse Spark-style syntax <code class="language-plaintext
highlighter-rouge">LEFT ANTI JOIN</code> in Babel parser</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5940">CALCITE-5940</a>]
+ Add a <code class="language-plaintext highlighter-rouge">RelRule</code> to
merge <code class="language-plaintext highlighter-rouge">Limit</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5971">CALCITE-5971</a>]
+ Add <code class="language-plaintext
highlighter-rouge">SampleToFilterRule</code> to rewrite bernoulli <code
class="language-plaintext highlighter-rouge">Sample</code> to <code
class="language-plaintext highlighter-rouge">Filter</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5994">CALCITE-5994</a>]
+ Add optimization rule to remove <code class="language-plaintext
highlighter-rouge">Sort</code> when its input’s row number is less or equal to
one</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5836">CALCITE-5836</a>]
+ Implement Rel2Sql for <code class="language-plaintext
highlighter-rouge">MERGE</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5889">CALCITE-5889</a>]
+ Add a <code class="language-plaintext highlighter-rouge">RelRule</code> that
converts <code class="language-plaintext highlighter-rouge">Minus</code> into
<code class="language-plaintext highlighter-rouge">UNION ALL..GROUP
BY...WHERE</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5944">CALCITE-5944</a>]
+ Add metadata for <code class="language-plaintext
highlighter-rouge">Sample</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5941">CALCITE-5941</a>]
+ Support <code class="language-plaintext highlighter-rouge">LITERAL_AGG</code>
in <code class="language-plaintext highlighter-rouge">Interpreter</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-985">CALCITE-985</a>]
+ Validate <code class="language-plaintext highlighter-rouge">MERGE</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5870">CALCITE-5870</a>]
+ Allow literals like <code class="language-plaintext
highlighter-rouge">DECIMAL '12.3'</code> (consistent with Postgres)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5916">CALCITE-5916</a>]
+ In <code class="language-plaintext highlighter-rouge">RelBuilder</code>, add
<code class="language-plaintext highlighter-rouge">sample()</code> method
(equivalent to SQL <code class="language-plaintext
highlighter-rouge">TABLESAMPLE</code> clause)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5184">CALCITE-5184</a>]
+ Support <code class="language-plaintext highlighter-rouge">LIMIT start,
ALL</code> in MySQL conformance, equivalent to <code class="language-plaintext
highlighter-rouge">OFFSET start</code>
+</li>
+</ul>
+
<h4 id="dependency-1-36-0">Dependency version upgrade</h4>
+<ul>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5763">CALCITE-5763</a>]
+ Increase minimum Guava version to 21.0, maximum version to 32.1.3-jre, and
stop building on Guava 19.0</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5938">CALCITE-5938</a>]
+ Update HSQLDB to Version 2.7.2 (using JDK8 JAR, default supports JDK11+)</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6004">CALCITE-6004</a>]
+ Replace deprecated mongo-java-driver dependency</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5966">CALCITE-5966</a>]
+ Upgrade commons-dbcp2 to 2.9.0</li>
+</ul>
+
<h4 id="fixes-1-36-0">Bug-fixes, API changes and minor enhancements</h4>
+<ul>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6088">CALCITE-6088</a>]
+ <code class="language-plaintext highlighter-rouge">SqlItemOperator</code>
fails in <code class="language-plaintext
highlighter-rouge">RelToSqlConverter</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5863">CALCITE-5863</a>]
+ Calcite rejects valid query with multiple <code class="language-plaintext
highlighter-rouge">ORDER BY</code> columns and constant <code
class="language-plaintext highlighter-rouge">RANGE</code> bounds in window
functions</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5984">CALCITE-5984</a>]
+ Allow disabling field trimming in <code class="language-plaintext
highlighter-rouge">Prepare</code> via <code class="language-plaintext
highlighter-rouge">SqlToRelConverter.Config#isTrimUnusedFields</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5990">CALCITE-5990</a>]
+ Explicit cast to numeric type doesn’t check overflow</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6052">CALCITE-6052</a>]
+ <code class="language-plaintext highlighter-rouge">SqlImplementor</code>
writes <code class="language-plaintext highlighter-rouge">REAL</code>, <code
class="language-plaintext highlighter-rouge">FLOAT</code>, or <code
class="language-plaintext highlighter-rouge">DOUBLE</code> literals as <code
class="language-plaintext highlighter-rouge">DECIMAL</code> literals</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6041">CALCITE-6041</a>]
+ <code class="language-plaintext highlighter-rouge">MAP</code> sub-query gives
<code class="language-plaintext highlighter-rouge">NullPointerException</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6037">CALCITE-6037</a>]
+ The function category of <code class="language-plaintext
highlighter-rouge">ARRAY</code>/<code class="language-plaintext
highlighter-rouge">EXTRACT_VALUE</code>/<code class="language-plaintext
highlighter-rouge">XML_TRANSFORM</code>/<code class="language-plaintext
highlighter-rouge">EXTRACT_XML</code>/<code class="language-plaintext
highlighter-rouge">EXISTSNODE</code> is incorrect</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6024">CALCITE-6024</a>]
+ A more efficient implementation of <code class="language-plaintext
highlighter-rouge">SqlOperatorTable</code>, backed by an immutable multi-map
keyed by upper-case operator name</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5949">CALCITE-5949</a>]
+ <code class="language-plaintext highlighter-rouge">RexExecutable</code>
should return unchanged original expressions when it fails</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6013">CALCITE-6013</a>]
+ <code class="language-plaintext highlighter-rouge">RelBuilder</code> should
simplify plan by pruning unused measures</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6040">CALCITE-6040</a>]
+ The operand type inference of <code class="language-plaintext
highlighter-rouge">SqlMapValueConstructor</code> is incorrect</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6030">CALCITE-6030</a>]
+ <code class="language-plaintext highlighter-rouge">DATE_PART</code> is not
handled by the <code class="language-plaintext
highlighter-rouge">RexToLixTranslator</code>
+</li>
+ <li>Following [<a
href="https://issues.apache.org/jira/browse/CALCITE-5570">CALCITE-5570</a>]
+ Support nested map type for <code class="language-plaintext
highlighter-rouge">SqlDataTypeSpec</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6050">CALCITE-6050</a>]
+Add interface <code class="language-plaintext
highlighter-rouge">ImmutablePairList</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5950">CALCITE-5950</a>]
+ <code class="language-plaintext highlighter-rouge">DEFAULT</code> expression
is ignored during <code class="language-plaintext
highlighter-rouge">INSERT</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6006">CALCITE-6006</a>]
+ <code class="language-plaintext highlighter-rouge">RelToSqlConverter</code>
loses charset information</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5948">CALCITE-5948</a>]
+ Use explicit casting if element type in <code class="language-plaintext
highlighter-rouge">ARRAY</code>/<code class="language-plaintext
highlighter-rouge">MAP</code> does not equal derived component type</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5989">CALCITE-5989</a>]
+ Type inference for <code class="language-plaintext
highlighter-rouge">RPAD</code> and <code class="language-plaintext
highlighter-rouge">LPAD</code> functions (BIGQUERY) is incorrect</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5982">CALCITE-5982</a>]
+ Allow implementations of <code class="language-plaintext
highlighter-rouge">CalciteMeta</code> to return extra columns in their
responses to <code class="language-plaintext
highlighter-rouge">DatabaseMetaData.getTables</code> and <code
class="language-plaintext highlighter-rouge">getColumns</code> requests</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6007">CALCITE-6007</a>]
+ Sub-query that contains <code class="language-plaintext
highlighter-rouge">WITH</code> and has no alias generates invalid SQL after
expansion</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6003">CALCITE-6003</a>]
+ <code class="language-plaintext highlighter-rouge">JSON_ARRAY()</code> with
no arguments does not unparse correctly</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6026">CALCITE-6026</a>]
+ MongoDB: Column is not quoted in <code class="language-plaintext
highlighter-rouge">ORDER BY</code> clause and throws JsonParseException</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6005">CALCITE-6005</a>]
+ <code class="language-plaintext highlighter-rouge">POLYGON</code> string
representation is different on Apple silicon</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5974">CALCITE-5974</a>]
+ Elasticsearch adapter throws <code class="language-plaintext
highlighter-rouge">ClassCastException</code> when index mapping sets <code
class="language-plaintext highlighter-rouge">dynamic_templates</code> without
<code class="language-plaintext highlighter-rouge">properties</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5995">CALCITE-5995</a>]
+ <code class="language-plaintext highlighter-rouge">JSON_VALUE</code>, <code
class="language-plaintext highlighter-rouge">JSON_EXISTS</code>, <code
class="language-plaintext highlighter-rouge">JSON_QUERY</code> functions should
cache generated objects between calls</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5960">CALCITE-5960</a>]
+ <code class="language-plaintext highlighter-rouge">CAST</code> throws
NullPointerException if <code class="language-plaintext
highlighter-rouge">SqlTypeFamily</code> of targetType is null</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5997">CALCITE-5997</a>]
+ <code class="language-plaintext highlighter-rouge">OFFSET</code> operator is
incorrectly unparsed</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5961">CALCITE-5961</a>]
+ Type inference of <code class="language-plaintext
highlighter-rouge">ARRAY_COMPACT</code> is incorrect</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5999">CALCITE-5999</a>]
+ <code class="language-plaintext highlighter-rouge">DECIMAL</code> literals as
sometimes unparsed looking as <code class="language-plaintext
highlighter-rouge">DOUBLE</code> literals</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5988">CALCITE-5988</a>]
+ <code class="language-plaintext
highlighter-rouge">SqlImplementor.toSql</code> cannot emit <code
class="language-plaintext highlighter-rouge">VARBINARY</code> literals</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5996">CALCITE-5996</a>]
+ <code class="language-plaintext highlighter-rouge">TRANSLATE</code> operator
is incorrectly unparsed</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5862">CALCITE-5862</a>]
+ Incorrect semantics of <code class="language-plaintext
highlighter-rouge">ARRAY</code> function (Spark library) when elements have
Numeric and Character types</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5931">CALCITE-5931</a>]
+ Allow round decimals like <code class="language-plaintext
highlighter-rouge">1.00</code> in window ranges</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5732">CALCITE-5732</a>]
+ <code class="language-plaintext highlighter-rouge">EnumerableHashJoin</code>
and <code class="language-plaintext
highlighter-rouge">EnumerableMergeJoin</code> on composite key return rows
matching condition <code class="language-plaintext highlighter-rouge">NULL =
NULL</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5967">CALCITE-5967</a>]
+ <code class="language-plaintext
highlighter-rouge">UnsupportedOperationException</code> while implementing a
call that requires a special collator</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5952">CALCITE-5952</a>]
+ <code class="language-plaintext
highlighter-rouge">SemiJoinJoinTransposeRule</code> should check if JoinType
supports pushing predicates into its inputs</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5953">CALCITE-5953</a>]
+ <code class="language-plaintext
highlighter-rouge">AggregateCaseToFilterRule</code> may make inaccurate <code
class="language-plaintext highlighter-rouge">SUM</code> transformations</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5861">CALCITE-5861</a>]
+ <code class="language-plaintext
highlighter-rouge">ReduceExpressionsRule</code> rules should constant-fold
expressions in window bounds</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5965">CALCITE-5965</a>]
+ Avoid unnecessary String concatenations in the <code
class="language-plaintext highlighter-rouge">RexFieldAccess</code> constructor
to improve the performance</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5914">CALCITE-5914</a>]
+ Cache compiled regular expressions in SQL function runtime</li>
+ <li>Refactor: In <code class="language-plaintext
highlighter-rouge">ReflectUtil</code>, add methods isStatic and isPublic</li>
+ <li>Refactor: In <code class="language-plaintext
highlighter-rouge">RexImpTable</code>, ensure that every method is in
BuiltInMethod</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5922">CALCITE-5922</a>]
+ The SQL generated for the <code class="language-plaintext
highlighter-rouge">POSITION</code> function(with 3 input arguments) by the
<code class="language-plaintext highlighter-rouge">SparkSqlDialect</code> is
not recognized by Spark SQL</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5920">CALCITE-5920</a>]
+ Reset <code class="language-plaintext
highlighter-rouge">PERCENTILE_CONT</code>/<code class="language-plaintext
highlighter-rouge">PERCENTILE_DISC</code> to reserved keywords</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5946">CALCITE-5946</a>]
+ <code class="language-plaintext highlighter-rouge">TimeString</code> should
allow fractional seconds ending in zero</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5906">CALCITE-5906</a>]
+ JDBC adapter should generate <code class="language-plaintext
highlighter-rouge">TABLESAMPLE</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5895">CALCITE-5895</a>]
+ <code class="language-plaintext highlighter-rouge">TABLESAMPLE (0)</code>
should return no rows</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5813">CALCITE-5813</a>]
+ Type inference for sql functions <code class="language-plaintext
highlighter-rouge">REPEAT</code>, <code class="language-plaintext
highlighter-rouge">SPACE</code>, <code class="language-plaintext
highlighter-rouge">XML_TRANSFORM</code>, and <code class="language-plaintext
highlighter-rouge">XML_EXTRACT</code> is incorrect</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5908">CALCITE-5908</a>]
+ Refactor: Remove unnecessary null checks in <code class="language-plaintext
highlighter-rouge">CalciteSchema</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5843">CALCITE-5843</a>]
+ Constant expression with nested casts causes a compiler crash</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5885">CALCITE-5885</a>]
+ <code class="language-plaintext
highlighter-rouge">SqlNode#toSqlString()</code> does not honor dialect’s <code
class="language-plaintext highlighter-rouge">supportsCharSet()</code> flag on
nested types</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5869">CALCITE-5869</a>]
+ <code class="language-plaintext highlighter-rouge">LEAST_RESTRICTIVE</code>
does not use inner type of <code class="language-plaintext
highlighter-rouge">MEASURE</code> for comparisons</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5903">CALCITE-5903</a>]
+ <code class="language-plaintext highlighter-rouge">RelMdCollation</code> does
not define collations for <code class="language-plaintext
highlighter-rouge">EnumerableLimit</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5882">CALCITE-5882</a>]
+ Compile-time evaluation of <code class="language-plaintext
highlighter-rouge">SPLIT</code> function returns incorrect result</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5879">CALCITE-5879</a>]
+ <code class="language-plaintext highlighter-rouge">AssertionError</code>
during constant reduction of <code class="language-plaintext
highlighter-rouge">SPLIT</code> expression that returns null</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5875">CALCITE-5875</a>]
+ Remove unnecessary null checks in Redis adapter</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5859">CALCITE-5859</a>]
+ Compile-time evaluation of <code class="language-plaintext
highlighter-rouge">LEFT(NULL, n)</code> should not throw <code
class="language-plaintext highlighter-rouge">RuntimeException</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5837">CALCITE-5837</a>]
+ <code class="language-plaintext highlighter-rouge">RexUtil#pullFactors</code>
output’s order should be deterministic even when the <code
class="language-plaintext highlighter-rouge">RexNode</code> kind is <code
class="language-plaintext highlighter-rouge">OR</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5877">CALCITE-5877</a>]
+ <code class="language-plaintext highlighter-rouge">AssertionError</code>
during <code class="language-plaintext highlighter-rouge">MOD</code> operation
if result scale is greater than maximum numeric scale</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5841">CALCITE-5841</a>]
+ Improve singleton implementation for <code class="language-plaintext
highlighter-rouge">ChinookAvaticaServer</code> in calcite-plus</li>
+ <li>Following [<a
href="https://issues.apache.org/jira/browse/CALCITE-5688">CALCITE-5688</a>]
+ Eliminate warnings in server parser</li>
+</ul>
+
<h4 id="build-1-36-0">Build and test suite</h4>
+<ul>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5921">CALCITE-5921</a>]
+ <code class="language-plaintext
highlighter-rouge">SqlOperatorFixture.checkFails</code> and <code
class="language-plaintext highlighter-rouge">checkAggFails</code> don’t check
runtime failure</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5923">CALCITE-5923</a>]
+ <code class="language-plaintext highlighter-rouge">SqlOperatorTest</code>
using <code class="language-plaintext highlighter-rouge">safeParameters</code>
are not using overridable fixture</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6014">CALCITE-6014</a>]
+ Create a <code class="language-plaintext
highlighter-rouge">SqlOperatorFixture</code> that parses, unparses, and then
parses again before executing</li>
+ <li>Incorrect test fixture used by <code class="language-plaintext
highlighter-rouge">SqlOperatorTest.testLeastFunc</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5980">CALCITE-5980</a>]
+ QuidemTests are not effectively executed on Windows</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5615">CALCITE-5615</a>]
+ Run SQL Logic Test suite using Calcite’s HSQLDB JDBC adapter</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5909">CALCITE-5909</a>]
+ <code class="language-plaintext
highlighter-rouge">SqlParserTest.testNoUnintendedNewReservedKeywords</code>
fails in IDE while passes in command line</li>
+ <li>Refactor <code class="language-plaintext
highlighter-rouge">RelDataTypeSystemTest</code> to use test fixture</li>
+ <li>Add various lint checks</li>
+ <li>Code style: lint</li>
+ <li>In <code class="language-plaintext highlighter-rouge">Puffin</code>,
allow an action to test whether it is looking at the last line of a source</li>
+</ul>
+
<h4 id="site-1-36-0">Web site and documentation</h4>
-<p>–></p>
+
+<ul>
+ <li>Site: Add Runkang He as committer</li>
+ <li>Site: Add Hongyu Guo as committer</li>
+ <li>Site: Add Lei Shen as committer</li>
+ <li>Site: Add Ran Tao as committer</li>
+ <li>Site: Add Mihai Budiu as committer</li>
+ <li>Site: Add Apache Wayang (incubating) to powered-by page</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5884">CALCITE-5884</a>]
+ <code class="language-plaintext highlighter-rouge">ARRAY_TO_STRING</code>
function should return <code class="language-plaintext
highlighter-rouge">NULL</code> if its <code class="language-plaintext
highlighter-rouge">nullValue</code> argument is <code class="language-plaintext
highlighter-rouge">NULL</code>
+</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6075">CALCITE-6075</a>]
+ Site: Cloning source code from GitHub using git protocol fails</li>
+ <li>Add example for <code class="language-plaintext
highlighter-rouge">MAP</code> type in reference docs</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6033">CALCITE-6033</a>]
+ Correct broken links on adapter page</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-6017">CALCITE-6017</a>]
+ Update the GitHub link of released versions</li>
+ <li>[<a
href="https://issues.apache.org/jira/browse/CALCITE-5905">CALCITE-5905</a>]
+ Documentation for <code class="language-plaintext highlighter-rouge">CREATE
TYPE</code> is incorrect</li>
+ <li>Remove mentions of binary distribution from README</li>
+ <li>Update broken link in <code class="language-plaintext
highlighter-rouge">RelMetadataProvider</code> Javadoc</li>
+ <li>The parameter names of <code class="language-plaintext
highlighter-rouge">SqlTypeMappingRules.Builder#add</code> are misleading</li>
+</ul>
<h2 id="v1-35-0">
<a
href="https://github.com/apache/calcite/releases/tag/calcite-1.35.0">1.35.0</a>
/ 2023-07-26</h2>
@@ -683,8 +984,8 @@ xinqiu.hu,
Zou Dan.</p>
<!--
-Command used to generate the release notes
-git log
b64cb1325cfe1a5143ea3ca534f991b6f881c3c5..ee9b80b0b68d442991dfaa142722e3488ec73e79
--format="%s" | sed 's|\[\(CALCITE-[0-9]\+\)\]|* [<a
href="https://issues.apache.org/jira/browse/\1">\1</a>]\n|'git log
b64cb1325cfe1a5143ea3ca534f991b6f881c3c5..ee9b80b0b68d442991dfaa142722e3488ec73e79
--format="%s" | sed 's|\[\(CALCITE-[0-9]\+\)\]|* [<a
href="https://issues.apache.org/jira/browse/\1">\1</a>]\n|'
+Command used to generate the release notes (nb: it does not work on MacOS)
+git log
b64cb1325cfe1a5143ea3ca534f991b6f881c3c5..ee9b80b0b68d442991dfaa142722e3488ec73e79
--format="%s" | sed 's|\[\(CALCITE-[0-9]\+\)\]|* [<a
href="https://issues.apache.org/jira/browse/\1">\1</a>]\n|'
-->
<h4 id="breaking-1-34-0">Breaking Changes</h4>
@@ -1170,7 +1471,7 @@ Zhengqiang Duan.</p>
<p id="breaking-1-32-0">Compatibility: This release is tested on Linux, macOS,
Microsoft Windows;
using JDK/OpenJDK versions 8 to 18;
-Guava versions 19.0 to 31.1-jre;
+Guava versions 16.0.1 to 31.1-jre;
other software versions as specified in gradle.properties.</p>
<h4 id="new-features-1-32-0">New features</h4>
diff --git a/docs/howto.html b/docs/howto.html
index d7c474296..a156c7cd7 100644
--- a/docs/howto.html
+++ b/docs/howto.html
@@ -162,8 +162,8 @@ and Gradle (version 7.6.1) on your path.</p>
<code class="language-plaintext highlighter-rouge">cd</code> to the root
directory of the unpacked source,
then build using Gradle:</p>
-<figure class="highlight"><pre><code class="language-bash"
data-lang="bash"><span class="nv">$ </span><span class="nb">tar </span>xvfz
apache-calcite-1.35.0-src.tar.gz
-<span class="nv">$ </span><span class="nb">cd </span>apache-calcite-1.35.0-src
+<figure class="highlight"><pre><code class="language-bash"
data-lang="bash"><span class="nv">$ </span><span class="nb">tar </span>xvfz
apache-calcite-1.36.0-src.tar.gz
+<span class="nv">$ </span><span class="nb">cd </span>apache-calcite-1.36.0-src
<span class="nv">$ </span>gradle build</code></pre></figure>
<p><a href="#running-tests">Running tests</a> describes how to run more or
fewer
diff --git a/docs/innodb_adapter.html b/docs/innodb_adapter.html
index c3d9d2ff8..82b35baaa 100644
--- a/docs/innodb_adapter.html
+++ b/docs/innodb_adapter.html
@@ -114,9 +114,9 @@ possible.</p>
</span><span class="err">--------------------</span><span class="w">
</span><span class="err">File</span><span class="w"> </span><span
class="err">System</span><span class="w"> </span><span
class="err">--------------------</span><span class="w">
- </span><span class="err">+------------+</span><span class="w">
</span><span class="err">+-----+</span><span class="w">
- </span><span class="err">|</span><span class="w"> </span><span
class="err">.ibd</span><span class="w"> </span><span
class="err">files</span><span class="w"> </span><span class="err">|</span><span
class="w"> </span><span class="err">...</span><span class="w"> </span><span
class="err">|</span><span class="w"> </span><span class="err">|</span><span
class="w"> </span><span class="err">InnoDB</span><span class="w">
</span><span class="err">Data</span><span class="w"> </span><span cla [...]
- </span><span class="err">+------------+</span><span class="w">
</span><span class="err">+-----+</span></code></pre></figure>
+ </span><span class="err">+------------+</span><span class="w">
</span><span class="err">+-----+</span><span class="w">
+ </span><span class="err">|</span><span class="w"> </span><span
class="err">.ibd</span><span class="w"> </span><span
class="err">files</span><span class="w"> </span><span class="err">|</span><span
class="w"> </span><span class="err">...</span><span class="w"> </span><span
class="err">|</span><span class="w"> </span><span class="err">|</span><span
class="w"> </span><span class="err">InnoDB</span><span class="w">
</span><span class="err">Data</span><span class="w"> </span><s [...]
+ </span><span class="err">+------------+</span><span class="w">
</span><span class="err">+-----+</span></code></pre></figure>
<p>What’s more, with DDL statements, the adapter is “index aware”. It
leverages rules to choose the appropriate index to scan, for example,
diff --git a/docs/reference.html b/docs/reference.html
index 4b4885ca4..ef53c5f43 100644
--- a/docs/reference.html
+++ b/docs/reference.html
@@ -201,7 +201,7 @@ form.</p>
<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="k">WITH</span> <span
class="p">[</span> <span class="k">RECURSIVE</span> <span class="p">]</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>
@@ -211,7 +211,7 @@ form.</p>
<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">LIMIT</span> <span
class="p">[</span> <span class="k">start</span><span class="p">,</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>
@@ -530,6 +530,7 @@ CONSTRAINT_NAME,
CONSTRAINT_SCHEMA,
CONSTRUCTOR,
<strong>CONTAINS</strong>,
+CONTAINS_SUBSTR,
CONTINUE,
<strong>CONVERT</strong>,
<strong>CORR</strong>,
@@ -716,6 +717,7 @@ JSON,
<strong>JSON_OBJECT</strong>,
<strong>JSON_OBJECTAGG</strong>,
<strong>JSON_QUERY</strong>,
+<strong>JSON_SCOPE</strong>,
<strong>JSON_VALUE</strong>,
K,
KEY,
@@ -844,8 +846,8 @@ PATH,
<strong>PATTERN</strong>,
<strong>PER</strong>,
<strong>PERCENT</strong>,
-PERCENTILE_CONT,
-PERCENTILE_DISC,
+<strong>PERCENTILE_CONT</strong>,
+<strong>PERCENTILE_DISC</strong>,
<strong>PERCENT_RANK</strong>,
<strong>PERIOD</strong>,
<strong>PERMUTE</strong>,
@@ -1200,22 +1202,27 @@ name will have been converted to upper case also.</p>
<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>
+ <td style="text-align: left">Example: 123.45 and DECIMAL ‘123.45’ are
identical values, and have type DECIMAL(5, 2)</td>
</tr>
<tr>
- <td style="text-align: left">NUMERIC</td>
+ <td style="text-align: left">NUMERIC(p, s)</td>
<td style="text-align: left">Fixed point</td>
- <td style="text-align: left"> </td>
+ <td style="text-align: left">A synonym for DECIMAL</td>
</tr>
<tr>
- <td style="text-align: left">REAL, FLOAT</td>
+ <td style="text-align: left">REAL</td>
<td style="text-align: left">4 byte floating point</td>
- <td style="text-align: left">6 decimal digits precision</td>
+ <td style="text-align: left">6 decimal digits precision; examples:
CAST(1.2 AS REAL), CAST(‘Infinity’ AS REAL)</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>
+ <td style="text-align: left">15 decimal digits precision; examples:
1.4E2, CAST(‘-Infinity’ AS DOUBLE), CAST(‘NaN’ AS DOUBLE)</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">FLOAT</td>
+ <td style="text-align: left">8 byte floating point</td>
+ <td style="text-align: left">A synonym for DOUBLE</td>
</tr>
<tr>
<td style="text-align: left">CHAR(n), CHARACTER(n)</td>
@@ -1320,12 +1327,12 @@ we also allow their plurals, YEARS, QUARTERS, MONTHS,
WEEKS, DAYS, HOURS, MINUTE
<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>
+ <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>
+ <td style="text-align: left">Example: (int, varchar) map</td>
</tr>
<tr>
<td style="text-align: left">MULTISET</td>
@@ -2209,7 +2216,7 @@ However, Calcite supports both implicit and explicit
conversion of values from o
<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>
+ <td style="text-align: left">Converts a value to a given type. Casts
between integer types truncate towards 0</td>
</tr>
<tr>
<td style="text-align: left">CONVERT(string, charSet1, charSet2)</td>
@@ -5431,6 +5438,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">ARRAY_EXCEPT(array1, array2)</td>
<td style="text-align: left">Returns an array of the elements in
<em>array1</em> but not in <em>array2</em>, without duplicates</td>
</tr>
+ <tr>
+ <td style="text-align: left">s</td>
+ <td style="text-align: left">ARRAY_INSERT(array, pos, element)</td>
+ <td style="text-align: left">Places <em>element</em> into index
<em>pos</em> of <em>array</em>. Array index start at 1, or start from the end
if index is negative. Index above array size appends the array, or prepends the
array if index is negative, with <code class="language-plaintext
highlighter-rouge">NULL</code> elements.</td>
+ </tr>
<tr>
<td style="text-align: left">s</td>
<td style="text-align: left">ARRAY_INTERSECT(array1, array2)</td>
@@ -5497,7 +5509,8 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<tr>
<td style="text-align: left">b</td>
<td style="text-align: left">ARRAY_TO_STRING(array, delimiter [,
nullText ])</td>
- <td style="text-align: left">Returns a concatenation of the elements in
<em>array</em> as a STRING and take <em>delimiter</em> as the delimiter. If the
<em>nullText</em> parameter is used, the function replaces any <code
class="language-plaintext highlighter-rouge">NULL</code> values in the array
with the value of <em>nullText</em>. If the <em>nullText</em> parameter is not
used, the function omits the <code class="language-plaintext
highlighter-rouge">NULL</code> value and its pre [...]
+ <td style="text-align: left">Returns a concatenation of the elements in
<em>array</em> as a STRING and take <em>delimiter</em> as the delimiter. If the
<em>nullText</em> parameter is used, the function replaces any <code
class="language-plaintext highlighter-rouge">NULL</code> values in the array
with the value of <em>nullText</em>. If the <em>nullText</em> parameter is not
used, the function omits the <code class="language-plaintext
highlighter-rouge">NULL</code> value and its pre [...]
+</td>
</tr>
<tr>
<td style="text-align: left">s</td>
@@ -5543,6 +5556,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">Returns the bit length of <em>string</em>
</td>
</tr>
+ <tr>
+ <td style="text-align: left">s</td>
+ <td style="text-align: left">BIT_GET(value, position)</td>
+ <td style="text-align: left">Returns the bit (0 or 1) value at the
specified <em>position</em> of numeric <em>value</em>. The positions are
numbered from right to left, starting at zero. The <em>position</em> argument
cannot be negative</td>
+ </tr>
<tr>
<td style="text-align: left">b</td>
<td style="text-align: left">CEIL(value)</td>
@@ -5559,6 +5577,16 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">Returns the character whose UTF-8 code is
<em>integer</em>
</td>
</tr>
+ <tr>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">CODE_POINTS_TO_BYTES(integers)</td>
+ <td style="text-align: left">Converts <em>integers</em>, an array of
integers between 0 and 255 inclusive, into bytes; throws error if any element
is out of range</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">CODE_POINTS_TO_STRING(integers)</td>
+ <td style="text-align: left">Converts <em>integers</em>, an array of
integers between 0 and 0xD7FF or between 0xE000 and 0x10FFFF inclusive, into
string; throws error if any element is out of range</td>
+ </tr>
<tr>
<td style="text-align: left">o</td>
<td style="text-align: left">CONCAT(string, string)</td>
@@ -5589,6 +5617,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<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">b</td>
+ <td style="text-align: left">CONTAINS_SUBSTR(expression, string [ ,
json_scope => json_scope_value ])</td>
+ <td style="text-align: left">Returns whether <em>string</em> exists as a
substring in <em>expression</em>. Optional <em>json_scope</em> argument
specifies what scope to search if <em>expression</em> is in JSON format.
Returns NULL if a NULL exists in <em>expression</em> that does not result in a
match</td>
+ </tr>
<tr>
<td style="text-align: left">q</td>
<td style="text-align: left">CONVERT(type, expression [ , style ])</td>
@@ -5789,6 +5822,16 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<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">h s</td>
+ <td style="text-align: left">FACTORIAL(integer)</td>
+ <td style="text-align: left">Returns the factorial of <em>integer</em>,
the range of <em>integer</em> is [0, 20]. Otherwise, returns NULL</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">h s</td>
+ <td style="text-align: left">FIND_IN_SET(matchStr, textStr)</td>
+ <td style="text-align: left">Returns the index (1-based) of the given
<em>matchStr</em> in the comma-delimited <em>textStr</em>. Returns 0, if the
given <em>matchStr</em> is not found or if the <em>matchStr</em> contains a
comma. For example, FIND_IN_SET(‘bc’, ‘a,bc,def’) returns 2</td>
+ </tr>
<tr>
<td style="text-align: left">b</td>
<td style="text-align: left">FLOOR(value)</td>
@@ -5806,6 +5849,16 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">Formats <em>timestamp</em> according to the
specified format <em>string</em>
</td>
</tr>
+ <tr>
+ <td style="text-align: left">h s</td>
+ <td style="text-align: left">FORMAT_NUMBER(value, decimalVal)</td>
+ <td style="text-align: left">Formats the number <em>value</em> like
‘#,###,###.##’, rounded to decimal places <em>decimalVal</em>. If
<em>decimalVal</em> is 0, the result has no decimal point or fractional
part</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">h s</td>
+ <td style="text-align: left">FORMAT_NUMBER(value, format)</td>
+ <td style="text-align: left">Formats the number <em>value</em> to
MySQL’s FORMAT <em>format</em>, like ‘#,###,###.##0.00’</td>
+ </tr>
<tr>
<td style="text-align: left">b</td>
<td style="text-align: left">FORMAT_TIME(string, time)</td>
@@ -5816,6 +5869,12 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">b</td>
<td style="text-align: left">FORMAT_TIMESTAMP(string timestamp)</td>
<td style="text-align: left">Formats <em>timestamp</em> according to the
specified format <em>string</em>
+</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">s</td>
+ <td style="text-align: left">GETBIT(value, position)</td>
+ <td style="text-align: left">Equivalent to <code
class="language-plaintext highlighter-rouge">BIT_GET(value, position)</code>
</td>
</tr>
<tr>
@@ -5834,6 +5893,16 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">Equivalent to <code
class="language-plaintext highlighter-rouge">NVL(value1, value2)</code>
</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">b o</td>
<td style="text-align: left">INSTR(string, substring [, from [,
occurrence ] ])</td>
@@ -5847,14 +5916,14 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
</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>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">IS_INF(value)</td>
+ <td style="text-align: left">Returns whether <em>value</em> is
infinite</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>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">IS_NAN(value)</td>
+ <td style="text-align: left">Returns whether <em>value</em> is NaN</td>
</tr>
<tr>
<td style="text-align: left">m</td>
@@ -5930,6 +5999,12 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">b</td>
<td style="text-align: left">LENGTH(string)</td>
<td style="text-align: left">Equivalent to <code
class="language-plaintext highlighter-rouge">CHAR_LENGTH(string)</code>
+</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">h s</td>
+ <td style="text-align: left">LEVENSHTEIN(string1, string2)</td>
+ <td style="text-align: left">Returns the Levenshtein distance between
<em>string1</em> and <em>string2</em>
</td>
</tr>
<tr>
@@ -5978,6 +6053,16 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<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">s</td>
+ <td style="text-align: left">MAP()</td>
+ <td style="text-align: left">Returns an empty map</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">s</td>
+ <td style="text-align: left">MAP(key, value [, key, value]*)</td>
+ <td style="text-align: left">Returns a map with the given
<em>key</em>/<em>value</em> pairs</td>
+ </tr>
<tr>
<td style="text-align: left">s</td>
<td style="text-align: left">MAP_CONCAT(map [, map]*)</td>
@@ -6060,6 +6145,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">Uses format specified by <em>format</em> to
convert <em>string</em> representation of timestamp to a TIMESTAMP WITH LOCAL
TIME ZONE value in <em>timeZone</em>
</td>
</tr>
+ <tr>
+ <td style="text-align: left">h s</td>
+ <td style="text-align: left">PARSE_URL(urlString, partToExtract [,
keyToExtract] )</td>
+ <td style="text-align: left">Returns the specified
<em>partToExtract</em> from the <em>urlString</em>. Valid values for
<em>partToExtract</em> include HOST, PATH, QUERY, REF, PROTOCOL, AUTHORITY,
FILE, and USERINFO. <em>keyToExtract</em> specifies which query to extract</td>
+ </tr>
<tr>
<td style="text-align: left">b</td>
<td style="text-align: left">POW(numeric1, numeric2)</td>
@@ -6067,9 +6157,35 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
</td>
</tr>
<tr>
- <td style="text-align: left">m o</td>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">REGEXP_CONTAINS(string, regexp)</td>
+ <td style="text-align: left">Returns whether <em>string</em> is a
partial match for the <em>regexp</em>
+</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">REGEXP_EXTRACT(string, regexp [, position
[, occurrence]])</td>
+ <td style="text-align: left">Returns the substring in <em>string</em>
that matches the <em>regexp</em>, starting search at <em>position</em> (default
1), and until locating the nth <em>occurrence</em> (default 1). Returns NULL if
there is no match</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">REGEXP_EXTRACT_ALL(string, regexp)</td>
+ <td style="text-align: left">Returns an array of all substrings in
<em>string</em> that matches the <em>regexp</em>. Returns an empty array if
there is no match</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">REGEXP_INSTR(string, regexp [, position [,
occurrence [, occurrence_position]]])</td>
+ <td style="text-align: left">Returns the lowest 1-based position of the
substring in <em>string</em> that matches the <em>regexp</em>, starting search
at <em>position</em> (default 1), and until locating the nth
<em>occurrence</em> (default 1). Setting occurrence_position (default 0) to 1
returns the end position of substring + 1. Returns 0 if there is no match</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">b 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>
+ <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> specifies 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">b</td>
+ <td style="text-align: left">REGEXP_SUBSTR(string, regexp [, position [,
occurrence]])</td>
+ <td style="text-align: left">Synonym for REGEXP_EXTRACT</td>
</tr>
<tr>
<td style="text-align: left">b m p</td>
@@ -6108,6 +6224,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<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">b</td>
+ <td style="text-align: left">SAFE_ADD(numeric1, numeric2)</td>
+ <td style="text-align: left">Returns <em>numeric1</em> +
<em>numeric2</em>, or NULL on overflow</td>
+ </tr>
<tr>
<td style="text-align: left">b</td>
<td style="text-align: left">SAFE_CAST(value AS type)</td>
@@ -6138,6 +6259,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">SAFE_ORDINAL(index)</td>
<td style="text-align: left">Similar to <code class="language-plaintext
highlighter-rouge">OFFSET</code> except <em>index</em> begins at 1 and null is
returned if <em>index</em> is out of bounds</td>
</tr>
+ <tr>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">SAFE_SUBTRACT(numeric1, numeric2)</td>
+ <td style="text-align: left">Returns <em>numeric1</em> -
<em>numeric2</em>, or NULL on overflow</td>
+ </tr>
<tr>
<td style="text-align: left">*</td>
<td style="text-align: left">SEC(numeric)</td>
@@ -6175,6 +6301,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<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">s</td>
+ <td style="text-align: left">SOUNDEX(string)</td>
+ <td style="text-align: left">Returns the phonetic representation of
<em>string</em>; return original <em>string</em> 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>
@@ -6334,6 +6465,11 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<td style="text-align: left">Converts <em>timestamp</em> to a string
using the format <em>format</em>
</td>
</tr>
+ <tr>
+ <td style="text-align: left">b</td>
+ <td style="text-align: left">TO_CODE_POINTS(string)</td>
+ <td style="text-align: left">Converts <em>string</em> to an array of
integers that represent code points or extended ASCII character values</td>
+ </tr>
<tr>
<td style="text-align: left">o p</td>
<td style="text-align: left">TO_DATE(string, format)</td>
@@ -6381,6 +6517,16 @@ function, return a Calcite <code
class="language-plaintext highlighter-rouge">TI
<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">s</td>
+ <td style="text-align: left">URL_DECODE(string)</td>
+ <td style="text-align: left">Decodes a <em>string</em> in
‘application/x-www-form-urlencoded’ format using a specific encoding scheme,
returns original <em>string</em> when decoded error</td>
+ </tr>
+ <tr>
+ <td style="text-align: left">s</td>
+ <td style="text-align: left">URL_ENCODE(string)</td>
+ <td style="text-align: left">Translates a <em>string</em> into
‘application/x-www-form-urlencoded’ format using a specific encoding scheme</td>
+ </tr>
<tr>
<td style="text-align: left">o</td>
<td style="text-align: left">XMLTRANSFORM(xml, xslt)</td>
@@ -7151,6 +7297,7 @@ to the JDBC connect string (see connect string property
<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">createTableLikeStatement</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>
@@ -7182,6 +7329,13 @@ to the JDBC connect string (see connect string property
<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">createTableLikeStatement</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="k">LIKE</span> <span class="n">sourceTable</span>
+ <span class="p">[</span> <span class="n">likeOption</span> <span
class="p">[,</span> <span class="n">likeOption</span> <span
class="p">]</span><span class="o">*</span> <span class="p">]</span>
+
+<span class="n">likeOption</span><span class="p">:</span>
+ <span class="p">{</span> <span class="k">INCLUDING</span> <span
class="o">|</span> <span class="k">EXCLUDING</span> <span class="p">}</span>
<span class="p">{</span> <span class="k">DEFAULTS</span> <span
class="o">|</span> <span class="k">GENERATED</span> <span class="o">|</span>
<span class="k">ALL</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>
@@ -7277,30 +7431,30 @@ 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>
+<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="p">(</span>
+ <span class="n">street</span> <span class="nb">VARCHAR</span><span
class="p">(</span><span class="mi">30</span><span class="p">),</span>
+ <span class="n">city</span> <span class="nb">VARCHAR</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">postal_code</span> <span class="nb">VARCHAR</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="p">(</span>
+ <span class="n">employee_id</span> <span
class="nb">DECIMAL</span><span class="p">(</span><span class="mi">6</span><span
class="p">),</span>
+ <span class="n">first_name</span> <span
class="nb">VARCHAR</span><span class="p">(</span><span
class="mi">20</span><span class="p">),</span>
+ <span class="n">last_name</span> <span
class="nb">VARCHAR</span><span class="p">(</span><span
class="mi">25</span><span class="p">),</span>
+ <span class="n">email</span> <span
class="nb">VARCHAR</span><span class="p">(</span><span
class="mi">25</span><span class="p">),</span>
+ <span class="n">phone_number</span> <span
class="nb">VARCHAR</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">job_id</span> <span
class="nb">VARCHAR</span><span class="p">(</span><span
class="mi">10</span><span class="p">),</span>
+ <span class="n">salary</span> <span
class="nb">DECIMAL</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="nb">DECIMAL</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="nb">DECIMAL</span><span class="p">(</span><span class="mi">6</span><span
class="p">),</span>
+ <span class="n">department_id</span> <span
class="nb">DECIMAL</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="s1">'555.777.2222'</span><span class="p">,</span> <span
class="nb">DATE</span> <span class="s1">'2004-05-01'</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>