[NO ISSUE][DOC] Chunk type function documentation
- Split type function documentation into chunks for content reuse
- Update POM for AQL and SQL++ functions
Change-Id: Ic7bc0d92d4278ccb7ce044068e7cdbd652efe986
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/10186
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>
Reviewed-by: Hussain Towaileb <hussainht@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/asterixdb/asterix-doc/pom.xml b/asterixdb/asterix-doc/pom.xml
index 7c21486..c58d983 100644
--- a/asterixdb/asterix-doc/pom.xml
+++ b/asterixdb/asterix-doc/pom.xml
@@ -55,10 +55,10 @@
<filelist dir="${project.basedir}/src/main/markdown/sqlpp" files="0_toc.md,1_intro.md,2_expr_title.md,2_expr.md,3_query_title.md,3_query.md,4_windowfunctions_title.md,4_windowfunctions.md,5_error_title.md,5_error.md,6_sql_diff_title.md,6_sql_diff.md,7_ddl_head.md,7_ddl_dml.md,appendix_1_title.md,appendix_1_keywords.md,appendix_2_title.md,appendix_2_parameters.md,appendix_2_parallel_sort.md,appendix_2_index_only.md,appendix_2_hints.md,appendix_3_title.md,appendix_3_resolution.md,appendix_4_title.md,appendix_4_manual_data.md" />
</concat>
<concat destfile="${project.build.directory}/generated-site/markdown/sqlpp/builtins.md">
- <filelist dir="${project.basedir}/src/main/markdown/builtins" files="0_toc.md,0_toc_sqlpp.md,0_toc_common.md,1_numeric_common.md,1_numeric_delta.md,2_string_common.md,2_string_delta.md,3_binary.md,4_spatial.md,5_similarity.md,6_tokenizing.md,7_temporal.md,7_allens.md,8_record.md,9_aggregate_sql.md,10_comparison.md,11_type.md,13_conditional.md,12_misc.md,15_bitwise.md,14_window.md" />
+ <filelist dir="${project.basedir}/src/main/markdown/builtins" files="0_toc.md,0_toc_sqlpp.md,0_toc_common.md,1_numeric_common.md,1_numeric_delta.md,2_string_common.md,2_string_delta.md,3_binary.md,4_spatial.md,5_similarity.md,6_tokenizing.md,7_temporal.md,7_allens.md,8_record.md,9_aggregate_sql.md,10_comparison.md,11_type_common.md,11_type_delta.md,11_type_conversion.md,13_conditional.md,12_misc.md,15_bitwise.md,14_window.md" />
</concat>
<concat destfile="${project.build.directory}/generated-site/markdown/aql/builtins.md">
- <filelist dir="${project.basedir}/src/main/markdown/builtins" files="0_toc.md,0_toc_aql.md,0_toc_common.md,1_numeric_common.md,1_numeric_delta.md,2_string_common.md,2_string_delta.md,3_binary.md,4_spatial.md,5_similarity.md,6_tokenizing.md,7_temporal.md,7_allens.md,8_record.md,9_aggregate_sql.md,10_comparison.md,11_type.md,13_conditional.md,12_misc.md" />
+ <filelist dir="${project.basedir}/src/main/markdown/builtins" files="0_toc.md,0_toc_aql.md,0_toc_common.md,1_numeric_common.md,1_numeric_delta.md,2_string_common.md,2_string_delta.md,3_binary.md,4_spatial.md,5_similarity.md,6_tokenizing.md,7_temporal.md,7_allens.md,8_record.md,9_aggregate_sql.md,10_comparison.md,11_type_common.md,11_type_delta.md,11_type_conversion.md,13_conditional.md,12_misc.md" />
</concat>
<concat destfile="${project.build.directory}/generated-site/markdown/datamodel.md">
<filelist dir="${project.basedir}/src/main/markdown/datamodel" files="datamodel_header.md,datamodel_primitive_common.md,datamodel_primitive_delta.md,datamodel_incomplete.md,datamodel_composite.md" />
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/11_type.md b/asterixdb/asterix-doc/src/main/markdown/builtins/11_type.md
deleted file mode 100644
index 72291a6..0000000
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/11_type.md
+++ /dev/null
@@ -1,1110 +0,0 @@
-<!--
- ! Licensed to the Apache Software Foundation (ASF) under one
- ! or more contributor license agreements. See the NOTICE file
- ! distributed with this work for additional information
- ! regarding copyright ownership. The ASF licenses this file
- ! to you under the Apache License, Version 2.0 (the
- ! "License"); you may not use this file except in compliance
- ! with the License. You may obtain a copy of the License at
- !
- ! http://www.apache.org/licenses/LICENSE-2.0
- !
- ! Unless required by applicable law or agreed to in writing,
- ! software distributed under the License is distributed on an
- ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ! KIND, either express or implied. See the License for the
- ! specific language governing permissions and limitations
- ! under the License.
- !-->
-
-## <a id="TypeFunctions">Type Functions</a> ##
-
-### get_type ###
- * Syntax:
-
- get_type(expr)
-
- * Returns a string describing the type of the given `expr`. This includes incomplete information types (i.e. `missing` and `null`).
- * Arguments:
- * `expr` : an expression (any type is allowed).
-
- * Example:
-
- {
- "a": get_type(true),
- "b": get_type(false),
- "c": get_type(null),
- "d": get_type(missing),
- "e": get_type("d"),
- "f": gettype(4.0),
- "g": gettype(5),
- "h": gettype(["1", 2]),
- "i": gettype({"a":1})
- };
-
-
- * The expected result is:
-
- { "a": "boolean", "b": "boolean", "c": "null", "d": "missing", "e": "string", "f": "double", "g": "bigint", "h": "array", "i": "object" }
-
- The function has an alias `gettype`.
-
-### is_array ###
- * Syntax:
-
- is_array(expr)
-
- * Checks whether the given expression is evaluated to be an `array` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is an `array` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_array(true),
- "b": is_array(false),
- "c": isarray(null),
- "d": isarray(missing),
- "e": isarray("d"),
- "f": isarray(4.0),
- "g": isarray(5),
- "h": isarray(["1", 2]),
- "i": isarray({"a":1})
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": true, "i": false }
-
- The function has an alias `isarray`.
-
-### is_multiset ###
- * Syntax:
-
- is_multiset(expr)
-
- * Checks whether the given expression is evaluated to be an `multiset` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is an `multiset` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_multiset(true),
- "b": is_multiset(false),
- "c": is_multiset(null),
- "d": is_multiset(missing),
- "e": is_multiset("d"),
- "f": ismultiset(4.0),
- "g": ismultiset(["1", 2]),
- "h": ismultiset({"a":1}),
- "i": ismultiset({{"hello", 9328, "world", [1, 2, null]}})
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": false, "i": true }
-
- The function has an alias `ismultiset`.
-
-### is_atomic (is_atom) ###
- * Syntax:
-
- is_atomic(expr)
-
- * Checks whether the given expression is evaluated to be a value of a [primitive](../datamodel.html#PrimitiveTypes) type.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a primitive type or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_atomic(true),
- "b": is_atomic(false),
- "c": isatomic(null),
- "d": isatomic(missing),
- "e": isatomic("d"),
- "f": isatom(4.0),
- "g": isatom(5),
- "h": isatom(["1", 2]),
- "i": isatom({"a":1})
- };
-
-* The expected result is:
-
- { "a": true, "b": true, "c": null, "e": true, "f": true, "g": true, "h": false, "i": false }
-
- The function has three aliases: `isatomic`, `is_atom`, and `isatom`.
-
-### is_boolean (is_bool) ###
- * Syntax:
-
- is_boolean(expr)
-
- * Checks whether the given expression is evaluated to be a `boolean` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `boolean` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": isboolean(true),
- "b": isboolean(false),
- "c": is_boolean(null),
- "d": is_boolean(missing),
- "e": isbool("d"),
- "f": isbool(4.0),
- "g": isbool(5),
- "h": isbool(["1", 2]),
- "i": isbool({"a":1})
- };
-
-
- * The expected result is:
-
- { "a": true, "b": true, "c": null, "e": false, "f": false, "g": false, "h": false, "i": false }
-
- The function has three aliases: `isboolean`, `is_bool`, and `isbool`.
-
-
-### is_binary (is_bin) ###
- * Syntax:
-
- is_binary(expr)
-
- * Checks whether the given expression is evaluated to be a `binary` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `binary` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_binary(true),
- "b": is_binary(false),
- "c": isbinary(null),
- "d": isbinary(missing),
- "e": isbin(point("1,2")),
- "f": isbin(hex("ABCDEF0123456789")),
- "g": is_bin(sub_binary(hex("AABBCCDD"), 4)),
- "h": is_bin(2),
- "i": is_bin({"a":1})
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": true, "g": true, "h": false, "i": false }
-
- The function has three aliases: `isbinary`, `is_bin`, and `isbin`.
-
-### is_number (is_num) ###
- * Syntax:
-
- is_number(expr)
-
- * Checks whether the given expression is evaluated to be a numeric value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `smallint`/`tinyint`/`integer`/`bigint`/`float`/`double`
- value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_number(true),
- "b": is_number(false),
- "c": isnumber(null),
- "d": isnumber(missing),
- "e": isnumber("d"),
- "f": isnum(4.0),
- "g": isnum(5),
- "h": isnum(["1", 2]),
- "i": isnum({"a":1})
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": true, "g": true, "h": false, "i": false }
-
- The function has three aliases: `isnumber`, `is_num`, and `isnum`.
-
-### is_point ###
- * Syntax:
-
- is_point(expr)
-
- * Checks whether the given expression is evaluated to be a `point` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `point` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_point(true),
- "b": is_point(false),
- "c": is_point(null),
- "d": is_point(missing),
- "e": is_point(point("1,2")),
- "f": ispoint(line("30.0,70.0 50.0,90.0")),
- "g": ispoint(rectangle("30.0,70.0 50.0,90.0")),
- "h": ispoint(circle("30.0,70.0 5.0")),
- "i": ispoint(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
- "j": ispoint(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": false, "j": false }
-
- The function has an alias `ispoint`.
-
-### is_line ###
- * Syntax:
-
- is_line(expr)
-
- * Checks whether the given expression is evaluated to be a `line` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `line` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_line(true),
- "b": is_line(false),
- "c": is_line(null),
- "d": is_line(missing),
- "e": is_line(point("1,2")),
- "f": isline(line("30.0,70.0 50.0,90.0")),
- "g": isline(rectangle("30.0,70.0 50.0,90.0")),
- "h": isline(circle("30.0,70.0 5.0")),
- "i": isline(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
- "j": isline(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": true, "g": false, "h": false, "i": false, "j": false }
-
- The function has an alias `isline`.
-
-### is_rectangle ###
- * Syntax:
-
- is_rectangle(expr)
-
- * Checks whether the given expression is evaluated to be a `rectangle` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `rectangle` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_rectangle(true),
- "b": is_rectangle(false),
- "c": is_rectangle(null),
- "d": is_rectangle(missing),
- "e": is_rectangle(point("1,2")),
- "f": isrectangle(line("30.0,70.0 50.0,90.0")),
- "g": isrectangle(rectangle("30.0,70.0 50.0,90.0")),
- "h": isrectangle(circle("30.0,70.0 5.0")),
- "i": isrectangle(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
- "j": isrectangle(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": false, "g": true, "h": false, "i": false, "j": false }
-
- The function has an alias `isrectangle`.
-
-### is_circle ###
- * Syntax:
-
- is_circle(expr)
-
- * Checks whether the given expression is evaluated to be a `circle` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `circle` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_circle(true),
- "b": is_circle(false),
- "c": is_circle(null),
- "d": is_circle(missing),
- "e": is_circle(point("1,2")),
- "f": iscircle(line("30.0,70.0 50.0,90.0")),
- "g": iscircle(rectangle("30.0,70.0 50.0,90.0")),
- "h": iscircle(circle("30.0,70.0 5.0")),
- "i": iscircle(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
- "j": iscircle(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": true, "i": false, "j": false }
-
- The function has an alias `iscircle`.
-
-### is_polygon ###
- * Syntax:
-
- is_polygon(expr)
-
- * Checks whether the given expression is evaluated to be a `polygon` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `polygon` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_polygon(true),
- "b": is_polygon(false),
- "c": is_polygon(null),
- "d": is_polygon(missing),
- "e": is_polygon(point("1,2")),
- "f": ispolygon(line("30.0,70.0 50.0,90.0")),
- "g": ispolygon(rectangle("30.0,70.0 50.0,90.0")),
- "h": ispolygon(circle("30.0,70.0 5.0")),
- "i": ispolygon(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
- "j": ispolygon(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": false, "i": true, "j": false }
-
- The function has an alias `ispolygon`.
-
-### is_spatial ###
- * Syntax:
-
- is_spatial(expr)
-
- * Checks whether the given expression is evaluated to be a spatial value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `point`/`line`/`rectangle`/`circle`/`polygon` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_spatial(true),
- "b": is_spatial(false),
- "c": is_spatial(null),
- "d": is_spatial(missing),
- "e": is_spatial(point("1,2")),
- "f": isspatial(line("30.0,70.0 50.0,90.0")),
- "g": isspatial(rectangle("30.0,70.0 50.0,90.0")),
- "h": isspatial(circle("30.0,70.0 5.0")),
- "i": isspatial(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
- "j": isspatial(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": true, "g": true, "h": true, "i": true, "j": false }
-
- The function has an alias `isspatial`.
-
-### is_date ###
- * Syntax:
-
- is_date(expr)
-
- * Checks whether the given expression is evaluated to be a `date` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `date` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_date(true),
- "b": is_date(false),
- "c": is_date(null),
- "d": is_date(missing),
- "e": is_date(date("-19700101")),
- "f": isdate(date("2013-01-01")),
- "g": isdate(time("12:12:12.039Z")),
- "h": isdate(datetime("2013-01-01T12:12:12.039Z")),
- "i": isdate(duration("P100Y12MT12M")),
- "j": isdate(interval(date("2013-01-01"), date("20130505"))),
- "k": isdate(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": true, "g": false, "h": false, "i": false, "j": false, "k": false }
-
- The function has an alias `isdate`.
-
-### is_datetime (is_timestamp) ###
- * Syntax:
-
- is_datetime(expr)
-
- * Checks whether the given expression is evaluated to be a `datetime` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `datetime` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_datetime(true),
- "b": is_datetime(false),
- "c": is_datetime(null),
- "d": is_datetime(missing),
- "e": is_datetime(datetime("2016-02-02T12:09:22.023Z")),
- "f": isdatetime(datetime("2011-03-03T12:10:42.011Z")),
- "g": isdatetime(time("12:12:12.039Z")),
- "h": is_timestamp(datetime("2013-01-01T12:12:12.039Z")),
- "i": is_timestamp(duration("P100Y12MT12M")),
- "j": istimestamp(interval(date("2013-01-01"), date("20130505"))),
- "k": istimestamp(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": true, "g": false, "h": true, "i": false, "j": false, "k": false }
-
- The function has three aliases: `isdatetime`, `is_timestamp`, and `istimestamp`.
-
-### is_time ###
- * Syntax:
-
- is_time(expr)
-
- * Checks whether the given expression is evaluated to be a `time` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `time` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_time(true),
- "b": is_time(false),
- "c": is_time(null),
- "d": is_time(missing),
- "e": is_time(time("08:00:00.000Z")),
- "f": istime(date("2013-01-01")),
- "g": istime(time("12:12:12.039Z")),
- "h": istime(datetime("2013-01-01T12:12:12.039Z")),
- "i": istime(duration("P100Y12MT12M")),
- "j": istime(interval(date("2013-01-01"), date("20130505"))),
- "k": istime(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": false, "g": true, "h": false, "i": false, "j": false, "k": false }
-
- The function has an alias `istime`.
-
-### is_duration ###
- * Syntax:
-
- is_duration(expr)
-
- * Checks whether the given expression is evaluated to be a duration value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `duration/year_month_duration/day_time_duration` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_duration(true),
- "b": is_duration(false),
- "c": is_duration(null),
- "d": is_duration(missing),
- "e": is_duration(duration("-PT20.943S")),
- "f": isduration(date("2013-01-01")),
- "g": isduration(time("12:12:12.039Z")),
- "h": isduration(datetime("2013-01-01T12:12:12.039Z")),
- "i": isduration(duration("P100Y12MT12M")),
- "j": isduration(interval(date("2013-01-01"), date("20130505"))),
- "k": isduration(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": true, "j": false, "k": false }
-
- The function has an alias `isduration`.
-
-### is_interval ###
- * Syntax:
-
- is_interval(expr)
-
- * Checks whether the given expression is evaluated to be a `interval` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `interval` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_interval(true),
- "b": is_interval(false),
- "c": is_interval(null),
- "d": is_interval(missing),
- "e": is_interval(interval(datetime("2013-01-01T00:01:01.000Z"), datetime("2013-05-05T13:39:01.049Z"))),
- "f": isinterval(date("2013-01-01")),
- "g": isinterval(time("12:12:12.039Z")),
- "h": isinterval(datetime("2013-01-01T12:12:12.039Z")),
- "i": isinterval(duration("P100Y12MT12M")),
- "j": isinterval(interval(date("2013-01-01"), date("20130505"))),
- "k": isinterval(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": false, "j": true, "k": false }
-
- The function has an alias `isinterval`.
-
-### is_temporal ###
- * Syntax:
-
- is_temporal(expr)
-
- * Checks whether the given expression is evaluated to be a temporal value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `date/datetime/time/duration/year_month_duration/day_time_duration/interval` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_temporal(true),
- "b": is_temporal(false),
- "c": is_temporal(null),
- "d": is_temporal(missing),
- "e": is_temporal(duration("-PT20.943S")),
- "f": istemporal(date("2013-01-01")),
- "g": istemporal(time("12:12:12.039Z")),
- "h": istemporal(datetime("2013-01-01T12:12:12.039Z")),
- "i": istemporal(duration("P100Y12MT12M")),
- "j": istemporal(interval(date("2013-01-01"), date("20130505"))),
- "k": istemporal(3)
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": true, "g": true, "h": true, "i": true, "j": true, "k": false }
-
- The function has an alias `istemporal`.
-
-### is_object (is_obj) ###
- * Syntax:
-
- is_object(expr)
-
- * Checks whether the given expression is evaluated to be a `object` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `object` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_object(true),
- "b": is_object(false),
- "c": isobject(null),
- "d": isobject(missing),
- "e": isobj("d"),
- "f": isobj(4.0),
- "g": isobj(5),
- "h": isobj(["1", 2]),
- "i": isobj({"a":1})
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": false, "i": true }
-
- The function has three aliases: `isobject`, `is_obj`, and `isobj`.
-
-
-### is_string (is_str) ###
- * Syntax:
-
- is_string(expr)
-
- * Checks whether the given expression is evaluated to be a `string` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `string` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_string(true),
- "b": isstring(false),
- "c": isstring(null),
- "d": isstr(missing),
- "e": isstr("d"),
- "f": isstr(4.0),
- "g": isstr(5),
- "h": isstr(["1", 2]),
- "i": isstr({"a":1})
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": false }
-
- The function has three aliases: `isstring`, `is_str`, and `isstr`.
-
-### is_uuid ###
- * Syntax:
-
- is_uuid(expr)
-
- * Checks whether the given expression is evaluated to be a `uuid` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the argument is a `uuid` value or not,
- * a `missing` if the argument is a `missing` value,
- * a `null` if the argument is a `null` value.
-
- * Example:
-
- {
- "a": is_uuid(true),
- "b": is_uuid(false),
- "c": is_uuid(null),
- "d": is_uuid(missing),
- "e": isuuid(4.0),
- "f": isuuid(date("2013-01-01")),
- "g": isuuid(uuid("5c848e5c-6b6a-498f-8452-8847a2957421"))
- };
-
-
- * The expected result is:
-
- { "a": false, "b": false, "c": null, "e": false, "f": false, "g": true }
-
- The function has an alias `isuuid`.
-
-
-### is_null ###
- * Syntax:
-
- is_null(expr)
-
- * Checks whether the given expression is evaluated to be a `null` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the variable is a `null` or not,
- * a `missing` if the input is `missing`.
-
- * Example:
-
- { "v1": is_null(null), "v2": is_null(1), "v3": is_null(missing) };
-
-
- * The expected result is:
-
- { "v1": true, "v2": false }
-
- The function has an alias `isnull`.
-
-### is_missing ###
- * Syntax:
-
- is_missing(expr)
-
- * Checks whether the given expression is evaluated to be a `missing` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the variable is a `missing` or not.
-
- * Example:
-
- { "v1": is_missing(null), "v2": is_missing(1), "v3": is_missing(missing) };
-
-
- * The expected result is:
-
- { "v1": false, "v2": false, "v3": true }
-
- The function has an alias `ismissing`.
-
-### is_unknown ###
- * Syntax:
-
- is_unknown(expr)
-
- * Checks whether the given variable is a `null` value or a `missing` value.
- * Arguments:
- * `expr` : an expression (any type is allowed).
- * Return Value:
- * a `boolean` on whether the variable is a `null`/``missing` value (`true`) or not (`false`).
-
- * Example:
-
- { "v1": is_unknown(null), "v2": is_unknown(1), "v3": is_unknown(missing) };
-
-
- * The expected result is:
-
- { "v1": true, "v2": false, "v3": true }
-
- The function has an alias `isunknown`.
-
-### to_array ###
- * Syntax:
-
- to_array(expr)
-
- * Converts input value to an `array` value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of `array` type then it is returned as is
- * if the argument is of `multiset` type then it is returned as an `array` with elements in an undefined order
- * otherwise an `array` containing the input expression as its single item is returned
-
- * Example:
-
- {
- "v1": to_array("asterix"),
- "v2": to_array(["asterix"]),
- };
-
- * The expected result is:
-
- { "v1": ["asterix"], "v2": ["asterix"] }
-
- The function has an alias `toarray`.
-
-### to_atomic (to_atom) ###
- * Syntax:
-
- to_atomic(expr)
-
- * Converts input value to a [primitive](../datamodel.html#PrimitiveTypes) value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of primitive type then it is returned as is
- * if the argument is of `array` or `multiset` type and has only one element then the result of invoking
- to_atomic() on that element is returned
- * if the argument is of `object` type and has only one field then the result of invoking to_atomic() on the
- value of that field is returned
- * otherwise `null` is returned
-
- * Example:
-
- {
- "v1": to_atomic("asterix"),
- "v2": to_atomic(["asterix"]),
- "v3": to_atomic([0, 1]),
- "v4": to_atomic({"value": "asterix"}),
- "v5": to_number({"x": 1, "y": 2})
- };
-
- * The expected result is:
-
- { "v1": "asterix", "v2": "asterix", "v3": null, "v4": "asterix", "v5": null }
-
- The function has three aliases: `toatomic`, `to_atom`, and `toatom`.
-
-### to_boolean (to_bool) ###
- * Syntax:
-
- to_boolean(expr)
-
- * Converts input value to a `boolean` value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of `boolean` type then it is returned as is
- * if the argument is of numeric type then `false` is returned if it is `0` or `NaN`, otherwise `true`
- * if the argument is of `string` type then `false` is returned if it's empty, otherwise `true`
- * if the argument is of `array` or `multiset` type then `false` is returned if it's size is `0`, otherwise `true`
- * if the argument is of `object` type then `false` is returned if it has no fields, otherwise `true`
- * type error is raised for all other input types
-
- * Example:
-
- {
- "v1": to_boolean(0),
- "v2": to_boolean(1),
- "v3": to_boolean(""),
- "v4": to_boolean("asterix")
- };
-
- * The expected result is:
-
- { "v1": false, "v2": true, "v3": false, "v4": true }
-
- The function has three aliases: `toboolean`, `to_bool`, and `tobool`.
-
-### to_bigint ###
- * Syntax:
-
- to_bigint(expr)
-
- * Converts input value to an integer value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of `boolean` type then `1` is returned if it is `true`, `0` if it is `false`
- * if the argument is of numeric integer type then it is returned as the same value of `bigint` type
- * if the argument is of numeric `float`/`double` type then it is converted to `bigint` type
- * if the argument is of `string` type and can be parsed as integer then that integer value is returned,
- otherwise `null` is returned
- * if the argument is of `array`/`multiset`/`object` type then `null` is returned
- * type error is raised for all other input types
-
- * Example:
-
- {
- "v1": to_bigint(false),
- "v2": to_bigint(true),
- "v3": to_bigint(10),
- "v4": to_bigint(float("1e100")),
- "v5": to_bigint(double("1e1000")),
- "v6": to_bigint("20")
- };
-
- * The expected result is:
-
- { "v1": 0, "v2": 1, "v3": 10, "v4": 9223372036854775807, "v5": 9223372036854775807, "v6": 20 }
-
- The function has an alias `tobigint`.
-
-### to_double ###
- * Syntax:
-
- to_double(expr)
-
- * Converts input value to a `double` value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of `boolean` type then `1.0` is returned if it is `true`, `0.0` if it is `false`
- * if the argument is of numeric type then it is returned as the value of `double` type
- * if the argument is of `string` type and can be parsed as `double` then that `double` value is returned,
- otherwise `null` is returned
- * if the argument is of `array`/`multiset`/`object` type then `null` is returned
- * type error is raised for all other input types
-
- * Example:
-
- {
- "v1": to_double(false),
- "v2": to_double(true),
- "v3": to_double(10),
- "v4": to_double(11.5),
- "v5": to_double("12.5")
- };
-
- * The expected result is:
-
- { "v1": 0.0, "v2": 1.0, "v3": 10.0, "v4": 11.5, "v5": 12.5 }
-
- The function has an alias `todouble`.
-
-### to_number (to_num) ###
- * Syntax:
-
- to_number(expr)
-
- * Converts input value to a numeric value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of numeric type then it is returned as is
- * if the argument is of `boolean` type then `1` is returned if it is `true`, `0` if it is `false`
- * if the argument is of `string` type and can be parsed as `bigint` then that `bigint` value is returned,
- otherwise if it can be parsed as `double` then that `double` value is returned,
- otherwise `null` is returned
- * if the argument is of `array`/`multiset`/`object` type then `null` is returned
- * type error is raised for all other input types
-
- * Example:
-
- {
- "v1": to_number(false),
- "v2": to_number(true),
- "v3": to_number(10),
- "v4": to_number(11.5),
- "v5": to_number("12.5")
- };
-
- * The expected result is:
-
- { "v1": 0, "v2": 1, "v3": 10, "v4": 11.5, "v5": 12.5 }
-
- The function has three aliases: `tonumber`, `to_num`, and `tonum`.
-
-### to_object (to_obj) ###
- * Syntax:
-
- to_object(expr)
-
- * Converts input value to an `object` value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of `object` type then it is returned as is
- * otherwise an empty `object` is returned
-
- * Example:
-
- {
- "v1": to_object({"value": "asterix"}),
- "v2": to_object("asterix")
- };
-
- * The expected result is:
-
- { "v1": {"value": "asterix"}, "v2": {} }
-
- The function has three aliases: `toobject`, `to_obj`, and `toobj`.
-
-### to_string (to_str) ###
- * Syntax:
-
- to_string(expr)
-
- * Converts input value to a string value
- * Arguments:
- * `expr` : an expression
- * Return Value:
- * if the argument is `missing` then `missing` is returned
- * if the argument is `null` then `null` is returned
- * if the argument is of `boolean` type then `"true"` is returned if it is `true`, `"false"` if it is `false`
- * if the argument is of numeric type then its string representation is returned
- * if the argument is of `string` type then it is returned as is
- * if the argument is of `array`/`multiset`/`object` type then `null` is returned
- * type error is raised for all other input types
-
- * Example:
-
- {
- "v1": to_string(false),
- "v2": to_string(true),
- "v3": to_string(10),
- "v4": to_string(11.5),
- "v5": to_string("asterix")
- };
-
- * The expected result is:
-
- { "v1": "false", "v2": "true", "v3": "10", "v4": "11.5", "v5": "asterix" }
-
- The function has three aliases: `tostring`, `to_str`, and `tostr`.
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_common.md b/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_common.md
new file mode 100644
index 0000000..5cbef2c
--- /dev/null
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_common.md
@@ -0,0 +1,328 @@
+<!--
+ ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements. See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership. The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License. You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied. See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ !-->
+
+## <a id="TypeFunctions">Type Functions</a> ##
+
+### is_array ###
+ * Syntax:
+
+ is_array(expr)
+
+ * Checks whether the given expression is evaluated to be an `array` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is an `array` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_array(true),
+ "b": is_array(false),
+ "c": isarray(null),
+ "d": isarray(missing),
+ "e": isarray("d"),
+ "f": isarray(4.0),
+ "g": isarray(5),
+ "h": isarray(["1", 2]),
+ "i": isarray({"a":1})
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": true, "i": false }
+
+ The function has an alias `isarray`.
+
+### is_multiset ###
+ * Syntax:
+
+ is_multiset(expr)
+
+ * Checks whether the given expression is evaluated to be an `multiset` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is an `multiset` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_multiset(true),
+ "b": is_multiset(false),
+ "c": is_multiset(null),
+ "d": is_multiset(missing),
+ "e": is_multiset("d"),
+ "f": ismultiset(4.0),
+ "g": ismultiset(["1", 2]),
+ "h": ismultiset({"a":1}),
+ "i": ismultiset({{"hello", 9328, "world", [1, 2, null]}})
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": false, "i": true }
+
+ The function has an alias `ismultiset`.
+
+### is_atomic (is_atom) ###
+ * Syntax:
+
+ is_atomic(expr)
+
+ * Checks whether the given expression is evaluated to be a value of a [primitive](../datamodel.html#PrimitiveTypes) type.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a primitive type or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_atomic(true),
+ "b": is_atomic(false),
+ "c": isatomic(null),
+ "d": isatomic(missing),
+ "e": isatomic("d"),
+ "f": isatom(4.0),
+ "g": isatom(5),
+ "h": isatom(["1", 2]),
+ "i": isatom({"a":1})
+ };
+
+* The expected result is:
+
+ { "a": true, "b": true, "c": null, "e": true, "f": true, "g": true, "h": false, "i": false }
+
+ The function has three aliases: `isatomic`, `is_atom`, and `isatom`.
+
+### is_boolean (is_bool) ###
+ * Syntax:
+
+ is_boolean(expr)
+
+ * Checks whether the given expression is evaluated to be a `boolean` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `boolean` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": isboolean(true),
+ "b": isboolean(false),
+ "c": is_boolean(null),
+ "d": is_boolean(missing),
+ "e": isbool("d"),
+ "f": isbool(4.0),
+ "g": isbool(5),
+ "h": isbool(["1", 2]),
+ "i": isbool({"a":1})
+ };
+
+
+ * The expected result is:
+
+ { "a": true, "b": true, "c": null, "e": false, "f": false, "g": false, "h": false, "i": false }
+
+ The function has three aliases: `isboolean`, `is_bool`, and `isbool`.
+
+
+### is_number (is_num) ###
+ * Syntax:
+
+ is_number(expr)
+
+ * Checks whether the given expression is evaluated to be a numeric value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `smallint`/`tinyint`/`integer`/`bigint`/`float`/`double`
+ value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_number(true),
+ "b": is_number(false),
+ "c": isnumber(null),
+ "d": isnumber(missing),
+ "e": isnumber("d"),
+ "f": isnum(4.0),
+ "g": isnum(5),
+ "h": isnum(["1", 2]),
+ "i": isnum({"a":1})
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": true, "g": true, "h": false, "i": false }
+
+ The function has three aliases: `isnumber`, `is_num`, and `isnum`.
+
+### is_object (is_obj) ###
+ * Syntax:
+
+ is_object(expr)
+
+ * Checks whether the given expression is evaluated to be a `object` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `object` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_object(true),
+ "b": is_object(false),
+ "c": isobject(null),
+ "d": isobject(missing),
+ "e": isobj("d"),
+ "f": isobj(4.0),
+ "g": isobj(5),
+ "h": isobj(["1", 2]),
+ "i": isobj({"a":1})
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": false, "i": true }
+
+ The function has three aliases: `isobject`, `is_obj`, and `isobj`.
+
+
+### is_string (is_str) ###
+ * Syntax:
+
+ is_string(expr)
+
+ * Checks whether the given expression is evaluated to be a `string` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `string` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_string(true),
+ "b": isstring(false),
+ "c": isstring(null),
+ "d": isstr(missing),
+ "e": isstr("d"),
+ "f": isstr(4.0),
+ "g": isstr(5),
+ "h": isstr(["1", 2]),
+ "i": isstr({"a":1})
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": false }
+
+ The function has three aliases: `isstring`, `is_str`, and `isstr`.
+
+### is_null ###
+ * Syntax:
+
+ is_null(expr)
+
+ * Checks whether the given expression is evaluated to be a `null` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the variable is a `null` or not,
+ * a `missing` if the input is `missing`.
+
+ * Example:
+
+ { "v1": is_null(null), "v2": is_null(1), "v3": is_null(missing) };
+
+
+ * The expected result is:
+
+ { "v1": true, "v2": false }
+
+ The function has an alias `isnull`.
+
+### is_missing ###
+ * Syntax:
+
+ is_missing(expr)
+
+ * Checks whether the given expression is evaluated to be a `missing` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the variable is a `missing` or not.
+
+ * Example:
+
+ { "v1": is_missing(null), "v2": is_missing(1), "v3": is_missing(missing) };
+
+
+ * The expected result is:
+
+ { "v1": false, "v2": false, "v3": true }
+
+ The function has an alias `ismissing`.
+
+### is_unknown ###
+ * Syntax:
+
+ is_unknown(expr)
+
+ * Checks whether the given variable is a `null` value or a `missing` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the variable is a `null`/``missing` value (`true`) or not (`false`).
+
+ * Example:
+
+ { "v1": is_unknown(null), "v2": is_unknown(1), "v3": is_unknown(missing) };
+
+
+ * The expected result is:
+
+ { "v1": true, "v2": false, "v3": true }
+
+ The function has an alias `isunknown`.
+
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_conversion.md b/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_conversion.md
new file mode 100644
index 0000000..70195ec
--- /dev/null
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_conversion.md
@@ -0,0 +1,279 @@
+<!--
+ ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements. See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership. The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License. You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied. See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ !-->
+
+### to_array ###
+ * Syntax:
+
+ to_array(expr)
+
+ * Converts input value to an `array` value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of `array` type then it is returned as is
+ * if the argument is of `multiset` type then it is returned as an `array` with elements in an undefined order
+ * otherwise an `array` containing the input expression as its single item is returned
+
+ * Example:
+
+ {
+ "v1": to_array("asterix"),
+ "v2": to_array(["asterix"]),
+ };
+
+ * The expected result is:
+
+ { "v1": ["asterix"], "v2": ["asterix"] }
+
+ The function has an alias `toarray`.
+
+### to_atomic (to_atom) ###
+ * Syntax:
+
+ to_atomic(expr)
+
+ * Converts input value to a [primitive](../datamodel.html#PrimitiveTypes) value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of primitive type then it is returned as is
+ * if the argument is of `array` or `multiset` type and has only one element then the result of invoking
+ to_atomic() on that element is returned
+ * if the argument is of `object` type and has only one field then the result of invoking to_atomic() on the
+ value of that field is returned
+ * otherwise `null` is returned
+
+ * Example:
+
+ {
+ "v1": to_atomic("asterix"),
+ "v2": to_atomic(["asterix"]),
+ "v3": to_atomic([0, 1]),
+ "v4": to_atomic({"value": "asterix"}),
+ "v5": to_number({"x": 1, "y": 2})
+ };
+
+ * The expected result is:
+
+ { "v1": "asterix", "v2": "asterix", "v3": null, "v4": "asterix", "v5": null }
+
+ The function has three aliases: `toatomic`, `to_atom`, and `toatom`.
+
+### to_boolean (to_bool) ###
+ * Syntax:
+
+ to_boolean(expr)
+
+ * Converts input value to a `boolean` value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of `boolean` type then it is returned as is
+ * if the argument is of numeric type then `false` is returned if it is `0` or `NaN`, otherwise `true`
+ * if the argument is of `string` type then `false` is returned if it's empty, otherwise `true`
+ * if the argument is of `array` or `multiset` type then `false` is returned if it's size is `0`, otherwise `true`
+ * if the argument is of `object` type then `false` is returned if it has no fields, otherwise `true`
+ * type error is raised for all other input types
+
+ * Example:
+
+ {
+ "v1": to_boolean(0),
+ "v2": to_boolean(1),
+ "v3": to_boolean(""),
+ "v4": to_boolean("asterix")
+ };
+
+ * The expected result is:
+
+ { "v1": false, "v2": true, "v3": false, "v4": true }
+
+ The function has three aliases: `toboolean`, `to_bool`, and `tobool`.
+
+### to_bigint ###
+ * Syntax:
+
+ to_bigint(expr)
+
+ * Converts input value to an integer value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of `boolean` type then `1` is returned if it is `true`, `0` if it is `false`
+ * if the argument is of numeric integer type then it is returned as the same value of `bigint` type
+ * if the argument is of numeric `float`/`double` type then it is converted to `bigint` type
+ * if the argument is of `string` type and can be parsed as integer then that integer value is returned,
+ otherwise `null` is returned
+ * if the argument is of `array`/`multiset`/`object` type then `null` is returned
+ * type error is raised for all other input types
+
+ * Example:
+
+ {
+ "v1": to_bigint(false),
+ "v2": to_bigint(true),
+ "v3": to_bigint(10),
+ "v4": to_bigint(float("1e100")),
+ "v5": to_bigint(double("1e1000")),
+ "v6": to_bigint("20")
+ };
+
+ * The expected result is:
+
+ { "v1": 0, "v2": 1, "v3": 10, "v4": 9223372036854775807, "v5": 9223372036854775807, "v6": 20 }
+
+ The function has an alias `tobigint`.
+
+### to_double ###
+ * Syntax:
+
+ to_double(expr)
+
+ * Converts input value to a `double` value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of `boolean` type then `1.0` is returned if it is `true`, `0.0` if it is `false`
+ * if the argument is of numeric type then it is returned as the value of `double` type
+ * if the argument is of `string` type and can be parsed as `double` then that `double` value is returned,
+ otherwise `null` is returned
+ * if the argument is of `array`/`multiset`/`object` type then `null` is returned
+ * type error is raised for all other input types
+
+ * Example:
+
+ {
+ "v1": to_double(false),
+ "v2": to_double(true),
+ "v3": to_double(10),
+ "v4": to_double(11.5),
+ "v5": to_double("12.5")
+ };
+
+ * The expected result is:
+
+ { "v1": 0.0, "v2": 1.0, "v3": 10.0, "v4": 11.5, "v5": 12.5 }
+
+ The function has an alias `todouble`.
+
+### to_number (to_num) ###
+ * Syntax:
+
+ to_number(expr)
+
+ * Converts input value to a numeric value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of numeric type then it is returned as is
+ * if the argument is of `boolean` type then `1` is returned if it is `true`, `0` if it is `false`
+ * if the argument is of `string` type and can be parsed as `bigint` then that `bigint` value is returned,
+ otherwise if it can be parsed as `double` then that `double` value is returned,
+ otherwise `null` is returned
+ * if the argument is of `array`/`multiset`/`object` type then `null` is returned
+ * type error is raised for all other input types
+
+ * Example:
+
+ {
+ "v1": to_number(false),
+ "v2": to_number(true),
+ "v3": to_number(10),
+ "v4": to_number(11.5),
+ "v5": to_number("12.5")
+ };
+
+ * The expected result is:
+
+ { "v1": 0, "v2": 1, "v3": 10, "v4": 11.5, "v5": 12.5 }
+
+ The function has three aliases: `tonumber`, `to_num`, and `tonum`.
+
+### to_object (to_obj) ###
+ * Syntax:
+
+ to_object(expr)
+
+ * Converts input value to an `object` value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of `object` type then it is returned as is
+ * otherwise an empty `object` is returned
+
+ * Example:
+
+ {
+ "v1": to_object({"value": "asterix"}),
+ "v2": to_object("asterix")
+ };
+
+ * The expected result is:
+
+ { "v1": {"value": "asterix"}, "v2": {} }
+
+ The function has three aliases: `toobject`, `to_obj`, and `toobj`.
+
+### to_string (to_str) ###
+ * Syntax:
+
+ to_string(expr)
+
+ * Converts input value to a string value
+ * Arguments:
+ * `expr` : an expression
+ * Return Value:
+ * if the argument is `missing` then `missing` is returned
+ * if the argument is `null` then `null` is returned
+ * if the argument is of `boolean` type then `"true"` is returned if it is `true`, `"false"` if it is `false`
+ * if the argument is of numeric type then its string representation is returned
+ * if the argument is of `string` type then it is returned as is
+ * if the argument is of `array`/`multiset`/`object` type then `null` is returned
+ * type error is raised for all other input types
+
+ * Example:
+
+ {
+ "v1": to_string(false),
+ "v2": to_string(true),
+ "v3": to_string(10),
+ "v4": to_string(11.5),
+ "v5": to_string("asterix")
+ };
+
+ * The expected result is:
+
+ { "v1": "false", "v2": "true", "v3": "10", "v4": "11.5", "v5": "asterix" }
+
+ The function has three aliases: `tostring`, `to_str`, and `tostr`.
+
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_delta.md b/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_delta.md
new file mode 100644
index 0000000..e9b89f8
--- /dev/null
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/11_type_delta.md
@@ -0,0 +1,541 @@
+<!--
+ ! Licensed to the Apache Software Foundation (ASF) under one
+ ! or more contributor license agreements. See the NOTICE file
+ ! distributed with this work for additional information
+ ! regarding copyright ownership. The ASF licenses this file
+ ! to you under the Apache License, Version 2.0 (the
+ ! "License"); you may not use this file except in compliance
+ ! with the License. You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing,
+ ! software distributed under the License is distributed on an
+ ! "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ! KIND, either express or implied. See the License for the
+ ! specific language governing permissions and limitations
+ ! under the License.
+ !-->
+
+### is_binary (is_bin) ###
+ * Syntax:
+
+ is_binary(expr)
+
+ * Checks whether the given expression is evaluated to be a `binary` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `binary` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_binary(true),
+ "b": is_binary(false),
+ "c": isbinary(null),
+ "d": isbinary(missing),
+ "e": isbin(point("1,2")),
+ "f": isbin(hex("ABCDEF0123456789")),
+ "g": is_bin(sub_binary(hex("AABBCCDD"), 4)),
+ "h": is_bin(2),
+ "i": is_bin({"a":1})
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": true, "g": true, "h": false, "i": false }
+
+ The function has three aliases: `isbinary`, `is_bin`, and `isbin`.
+
+### is_uuid ###
+ * Syntax:
+
+ is_uuid(expr)
+
+ * Checks whether the given expression is evaluated to be a `uuid` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `uuid` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_uuid(true),
+ "b": is_uuid(false),
+ "c": is_uuid(null),
+ "d": is_uuid(missing),
+ "e": isuuid(4.0),
+ "f": isuuid(date("2013-01-01")),
+ "g": isuuid(uuid("5c848e5c-6b6a-498f-8452-8847a2957421"))
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": false, "g": true }
+
+ The function has an alias `isuuid`.
+
+### is_point ###
+ * Syntax:
+
+ is_point(expr)
+
+ * Checks whether the given expression is evaluated to be a `point` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `point` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_point(true),
+ "b": is_point(false),
+ "c": is_point(null),
+ "d": is_point(missing),
+ "e": is_point(point("1,2")),
+ "f": ispoint(line("30.0,70.0 50.0,90.0")),
+ "g": ispoint(rectangle("30.0,70.0 50.0,90.0")),
+ "h": ispoint(circle("30.0,70.0 5.0")),
+ "i": ispoint(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
+ "j": ispoint(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": false, "j": false }
+
+ The function has an alias `ispoint`.
+
+### is_line ###
+ * Syntax:
+
+ is_line(expr)
+
+ * Checks whether the given expression is evaluated to be a `line` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `line` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_line(true),
+ "b": is_line(false),
+ "c": is_line(null),
+ "d": is_line(missing),
+ "e": is_line(point("1,2")),
+ "f": isline(line("30.0,70.0 50.0,90.0")),
+ "g": isline(rectangle("30.0,70.0 50.0,90.0")),
+ "h": isline(circle("30.0,70.0 5.0")),
+ "i": isline(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
+ "j": isline(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": true, "g": false, "h": false, "i": false, "j": false }
+
+ The function has an alias `isline`.
+
+### is_rectangle ###
+ * Syntax:
+
+ is_rectangle(expr)
+
+ * Checks whether the given expression is evaluated to be a `rectangle` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `rectangle` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_rectangle(true),
+ "b": is_rectangle(false),
+ "c": is_rectangle(null),
+ "d": is_rectangle(missing),
+ "e": is_rectangle(point("1,2")),
+ "f": isrectangle(line("30.0,70.0 50.0,90.0")),
+ "g": isrectangle(rectangle("30.0,70.0 50.0,90.0")),
+ "h": isrectangle(circle("30.0,70.0 5.0")),
+ "i": isrectangle(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
+ "j": isrectangle(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": false, "g": true, "h": false, "i": false, "j": false }
+
+ The function has an alias `isrectangle`.
+
+### is_circle ###
+ * Syntax:
+
+ is_circle(expr)
+
+ * Checks whether the given expression is evaluated to be a `circle` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `circle` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_circle(true),
+ "b": is_circle(false),
+ "c": is_circle(null),
+ "d": is_circle(missing),
+ "e": is_circle(point("1,2")),
+ "f": iscircle(line("30.0,70.0 50.0,90.0")),
+ "g": iscircle(rectangle("30.0,70.0 50.0,90.0")),
+ "h": iscircle(circle("30.0,70.0 5.0")),
+ "i": iscircle(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
+ "j": iscircle(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": true, "i": false, "j": false }
+
+ The function has an alias `iscircle`.
+
+### is_polygon ###
+ * Syntax:
+
+ is_polygon(expr)
+
+ * Checks whether the given expression is evaluated to be a `polygon` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `polygon` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_polygon(true),
+ "b": is_polygon(false),
+ "c": is_polygon(null),
+ "d": is_polygon(missing),
+ "e": is_polygon(point("1,2")),
+ "f": ispolygon(line("30.0,70.0 50.0,90.0")),
+ "g": ispolygon(rectangle("30.0,70.0 50.0,90.0")),
+ "h": ispolygon(circle("30.0,70.0 5.0")),
+ "i": ispolygon(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
+ "j": ispolygon(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": false, "f": false, "g": false, "h": false, "i": true, "j": false }
+
+ The function has an alias `ispolygon`.
+
+### is_spatial ###
+ * Syntax:
+
+ is_spatial(expr)
+
+ * Checks whether the given expression is evaluated to be a spatial value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `point`/`line`/`rectangle`/`circle`/`polygon` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_spatial(true),
+ "b": is_spatial(false),
+ "c": is_spatial(null),
+ "d": is_spatial(missing),
+ "e": is_spatial(point("1,2")),
+ "f": isspatial(line("30.0,70.0 50.0,90.0")),
+ "g": isspatial(rectangle("30.0,70.0 50.0,90.0")),
+ "h": isspatial(circle("30.0,70.0 5.0")),
+ "i": isspatial(polygon("1.0,1.0 2.0,2.0 3.0,3.0 4.0,4.0")),
+ "j": isspatial(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": true, "g": true, "h": true, "i": true, "j": false }
+
+ The function has an alias `isspatial`.
+
+### is_date ###
+ * Syntax:
+
+ is_date(expr)
+
+ * Checks whether the given expression is evaluated to be a `date` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `date` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_date(true),
+ "b": is_date(false),
+ "c": is_date(null),
+ "d": is_date(missing),
+ "e": is_date(date("-19700101")),
+ "f": isdate(date("2013-01-01")),
+ "g": isdate(time("12:12:12.039Z")),
+ "h": isdate(datetime("2013-01-01T12:12:12.039Z")),
+ "i": isdate(duration("P100Y12MT12M")),
+ "j": isdate(interval(date("2013-01-01"), date("20130505"))),
+ "k": isdate(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": true, "g": false, "h": false, "i": false, "j": false, "k": false }
+
+ The function has an alias `isdate`.
+
+### is_datetime (is_timestamp) ###
+ * Syntax:
+
+ is_datetime(expr)
+
+ * Checks whether the given expression is evaluated to be a `datetime` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `datetime` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_datetime(true),
+ "b": is_datetime(false),
+ "c": is_datetime(null),
+ "d": is_datetime(missing),
+ "e": is_datetime(datetime("2016-02-02T12:09:22.023Z")),
+ "f": isdatetime(datetime("2011-03-03T12:10:42.011Z")),
+ "g": isdatetime(time("12:12:12.039Z")),
+ "h": is_timestamp(datetime("2013-01-01T12:12:12.039Z")),
+ "i": is_timestamp(duration("P100Y12MT12M")),
+ "j": istimestamp(interval(date("2013-01-01"), date("20130505"))),
+ "k": istimestamp(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": true, "g": false, "h": true, "i": false, "j": false, "k": false }
+
+ The function has three aliases: `isdatetime`, `is_timestamp`, and `istimestamp`.
+
+### is_time ###
+ * Syntax:
+
+ is_time(expr)
+
+ * Checks whether the given expression is evaluated to be a `time` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `time` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_time(true),
+ "b": is_time(false),
+ "c": is_time(null),
+ "d": is_time(missing),
+ "e": is_time(time("08:00:00.000Z")),
+ "f": istime(date("2013-01-01")),
+ "g": istime(time("12:12:12.039Z")),
+ "h": istime(datetime("2013-01-01T12:12:12.039Z")),
+ "i": istime(duration("P100Y12MT12M")),
+ "j": istime(interval(date("2013-01-01"), date("20130505"))),
+ "k": istime(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": false, "g": true, "h": false, "i": false, "j": false, "k": false }
+
+ The function has an alias `istime`.
+
+### is_duration ###
+ * Syntax:
+
+ is_duration(expr)
+
+ * Checks whether the given expression is evaluated to be a duration value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `duration/year_month_duration/day_time_duration` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_duration(true),
+ "b": is_duration(false),
+ "c": is_duration(null),
+ "d": is_duration(missing),
+ "e": is_duration(duration("-PT20.943S")),
+ "f": isduration(date("2013-01-01")),
+ "g": isduration(time("12:12:12.039Z")),
+ "h": isduration(datetime("2013-01-01T12:12:12.039Z")),
+ "i": isduration(duration("P100Y12MT12M")),
+ "j": isduration(interval(date("2013-01-01"), date("20130505"))),
+ "k": isduration(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": true, "j": false, "k": false }
+
+ The function has an alias `isduration`.
+
+### is_interval ###
+ * Syntax:
+
+ is_interval(expr)
+
+ * Checks whether the given expression is evaluated to be a `interval` value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `interval` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_interval(true),
+ "b": is_interval(false),
+ "c": is_interval(null),
+ "d": is_interval(missing),
+ "e": is_interval(interval(datetime("2013-01-01T00:01:01.000Z"), datetime("2013-05-05T13:39:01.049Z"))),
+ "f": isinterval(date("2013-01-01")),
+ "g": isinterval(time("12:12:12.039Z")),
+ "h": isinterval(datetime("2013-01-01T12:12:12.039Z")),
+ "i": isinterval(duration("P100Y12MT12M")),
+ "j": isinterval(interval(date("2013-01-01"), date("20130505"))),
+ "k": isinterval(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": false, "g": false, "h": false, "i": false, "j": true, "k": false }
+
+ The function has an alias `isinterval`.
+
+### is_temporal ###
+ * Syntax:
+
+ is_temporal(expr)
+
+ * Checks whether the given expression is evaluated to be a temporal value.
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+ * Return Value:
+ * a `boolean` on whether the argument is a `date/datetime/time/duration/year_month_duration/day_time_duration/interval` value or not,
+ * a `missing` if the argument is a `missing` value,
+ * a `null` if the argument is a `null` value.
+
+ * Example:
+
+ {
+ "a": is_temporal(true),
+ "b": is_temporal(false),
+ "c": is_temporal(null),
+ "d": is_temporal(missing),
+ "e": is_temporal(duration("-PT20.943S")),
+ "f": istemporal(date("2013-01-01")),
+ "g": istemporal(time("12:12:12.039Z")),
+ "h": istemporal(datetime("2013-01-01T12:12:12.039Z")),
+ "i": istemporal(duration("P100Y12MT12M")),
+ "j": istemporal(interval(date("2013-01-01"), date("20130505"))),
+ "k": istemporal(3)
+ };
+
+
+ * The expected result is:
+
+ { "a": false, "b": false, "c": null, "e": true, "f": true, "g": true, "h": true, "i": true, "j": true, "k": false }
+
+ The function has an alias `istemporal`.
+
+### get_type ###
+ * Syntax:
+
+ get_type(expr)
+
+ * Returns a string describing the type of the given `expr`. This includes incomplete information types (i.e. `missing` and `null`).
+ * Arguments:
+ * `expr` : an expression (any type is allowed).
+
+ * Example:
+
+ {
+ "a": get_type(true),
+ "b": get_type(false),
+ "c": get_type(null),
+ "d": get_type(missing),
+ "e": get_type("d"),
+ "f": gettype(4.0),
+ "g": gettype(5),
+ "h": gettype(["1", 2]),
+ "i": gettype({"a":1})
+ };
+
+
+ * The expected result is:
+
+ { "a": "boolean", "b": "boolean", "c": "null", "d": "missing", "e": "string", "f": "double", "g": "bigint", "h": "array", "i": "object" }
+
+ The function has an alias `gettype`.
+