>From Vivek Gangavarapu <[email protected]>:

Vivek Gangavarapu has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21622?usp=email )


Change subject: [NO ISSUE][DOC] Document array functions
......................................................................

[NO ISSUE][DOC] Document array functions

  - user model changes: no
  - storage format changes: no
  - interface changes: no

Details:
The builtin function reference has no Array Functions section, so the
26 array_* functions have never been documented. The only array entry
in the table of contents is "Aggregate Functions (Array Functions)",
which is a different set of functions.

Add builtins/16_array.md covering array_append, array_binary_search,
array_concat, array_contains, array_distinct, array_except,
array_flatten, array_ifnull, array_insert, array_intersect, array_move,
array_position, array_prepend, array_put, array_range, array_remove,
array_repeat, array_replace, array_reverse, array_slice, array_sort,
array_star, array_swap, array_symdiff, array_symdiffn and array_union.
Argument, return value and null/missing behavior were taken from the
function descriptors; every example is taken from the runtime tests so
the stated results match what the engine produces.

Note which functions require an ordered list and return null for a
multiset, and which combinations raise a type error.

Wire the new file into the SQL++ builtins table of contents and into
the site build.

Generated-by: Claude Code w/ Opus 5
Change-Id: I7a2b7668d54b69d541b3dc2aaf2d44201f68ff40
---
M asterixdb/asterix-doc/pom.xml
M asterixdb/asterix-doc/src/main/markdown/builtins/0_toc_sqlpp.md
A asterixdb/asterix-doc/src/main/markdown/builtins/16_array.md
3 files changed, 649 insertions(+), 1 deletion(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/22/21622/1

diff --git a/asterixdb/asterix-doc/pom.xml b/asterixdb/asterix-doc/pom.xml
index fbe601d..45933d1 100644
--- a/asterixdb/asterix-doc/pom.xml
+++ b/asterixdb/asterix-doc/pom.xml
@@ -55,7 +55,7 @@
                   <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_arrayindex.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_common.md,11_type_delta.md,11_type_conversion.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,16_array.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_common.md,11_type_delta.md,11_type_conversion.md,13_conditional.md,12_misc.md"
 />
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/0_toc_sqlpp.md 
b/asterixdb/asterix-doc/src/main/markdown/builtins/0_toc_sqlpp.md
index 1869169..eb3895f 100644
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/0_toc_sqlpp.md
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/0_toc_sqlpp.md
@@ -26,6 +26,7 @@
 * [Similarity Functions](#SimilarityFunctions)
 * [Tokenizing Functions](#TokenizingFunctions)
 * [Temporal Functions](#TemporalFunctions)
+* [Array Functions](#ArrayFunctions)
 * [Object Functions](#ObjectFunctions)
 * [Aggregate Functions (Array Functions)](#AggregateFunctions)
 * [Comparison Functions](#ComparisonFunctions)
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/16_array.md 
b/asterixdb/asterix-doc/src/main/markdown/builtins/16_array.md
new file mode 100644
index 0000000..ca2e19e
--- /dev/null
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/16_array.md
@@ -0,0 +1,647 @@
+<!--
+ ! 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="ArrayFunctions">Array Functions</a> ##
+
+The functions in this section operate on lists, that is, on values of the 
`array` (ordered list)
+and `multiset` (unordered list) types. Unless stated otherwise, a function 
returns a list of the
+same kind as its list argument, and returns `null` when that argument is not a 
list.
+
+`array_binary_search`, `array_move`, `array_star` and `array_swap` require an 
ordered list and
+return `null` for a `multiset`.
+
+Positions are 0-based. A negative position counts backwards from the end of 
the list, where `-1`
+is the last item. A position given as a floating-point number is accepted only 
when it has no
+fractional part, so `1.0` is a valid position but `1.5` is not.
+
+These functions compare items by value and are case-sensitive to string items.
+
+### array_append ###
+ * Syntax:
+
+        array_append(input_list, val1, val2, ...)
+
+ * Returns a new list with the values appended to the items of the input list.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `val1`, `val2`, ... : values to append. `null` values are appended as 
`null`.
+ * Return Value:
+    * a new list with the values appended,
+    * `missing` if any argument is a `missing` value,
+    * `null` if `input_list` is a `null` value or is not a list.
+
+ * Example:
+
+        array_append([3], 3, [9], null, "sth");
+
+ * The expected result is:
+
+        [ 3, 3, [ 9 ], null, "sth" ]
+
+### array_binary_search ###
+ * Syntax:
+
+        array_binary_search(ordered_list, search_value)
+
+ * Returns the position of `search_value` in `ordered_list`, which is assumed 
to be sorted in
+   ascending order. If the value occurs more than once, the position of one of 
its occurrences
+   is returned.
+ * Arguments:
+    * `ordered_list` : an `array` sorted in ascending order.
+    * `search_value` : the value to search for.
+ * Return Value:
+    * the 0-based position of `search_value`, or `-1` if it is not found,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, or if `ordered_list` is not an 
`array`.
+
+ * Example:
+
+        array_binary_search([1, 2, 3, 4, 5, 6, 7], 4);
+
+ * The expected result is:
+
+        3
+
+### array_concat ###
+ * Syntax:
+
+        array_concat(list1, list2, ...)
+
+ * Returns a new list with the items of all input lists appended in order.
+ * Arguments:
+    * `list1`, `list2`, ... : lists of the same kind. Items may be `null` or 
`missing`; both are
+      added as `null`.
+ * Return Value:
+    * a new list with all items of the input lists,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value or is not a list,
+    * a type error if the input lists are not all of the same kind, that is, 
if an `array` is
+      mixed with a `multiset`.
+
+ * Example:
+
+        array_concat([3, missing], [3, [9], null, missing, null]);
+
+ * The expected result is:
+
+        [ 3, null, 3, [ 9 ], null, null, null ]
+
+### array_contains ###
+ * Syntax:
+
+        array_contains(input_list, value)
+
+ * Returns whether the input list contains the given value.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `value` : the value to look for.
+ * Return Value:
+    * `true` if `input_list` contains `value`, `false` otherwise,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, or if `input_list` is not a 
list.
+
+ * Example:
+
+        array_contains([3, 8, 98, 40], 40.0);
+
+ * The expected result is:
+
+        true
+
+### array_distinct ###
+ * Syntax:
+
+        array_distinct(input_list)
+
+ * Returns a new list with the distinct items of the input list. `null` and 
`missing` items are
+   treated as the same value.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+ * Return Value:
+    * a new list with the duplicates removed,
+    * `missing` if the argument is a `missing` value,
+    * `null` if the argument is a `null` value or is not a list.
+
+ * Example:
+
+        array_distinct([1, 2, null, 4, missing, 2, 1]);
+
+ * The expected result is:
+
+        [ 1, 2, null, 4 ]
+
+### array_except ###
+ * Syntax:
+
+        array_except(list1, list2)
+
+ * Returns a new list with the items of `list1` that do not occur in `list2`. 
Duplicates in
+   `list1` are preserved.
+ * Arguments:
+    * `list1` : an `array` or `multiset`.
+    * `list2` : an `array` or `multiset` holding the items to exclude.
+ * Return Value:
+    * a new list with the remaining items of `list1`,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value or is not a list.
+
+ * Example:
+
+        array_except([1, 2], [1, 3]);
+
+ * The expected result is:
+
+        [ 2 ]
+
+### array_flatten ###
+ * Syntax:
+
+        array_flatten(input_list, depth)
+
+ * Returns a new list with the nested lists of the input list flattened up to 
the given depth.
+   `null` and `missing` items are preserved as `null`.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `depth` : an integer giving how many levels to flatten. A depth of `0` 
leaves the list
+      unchanged, and a negative depth flattens all levels.
+ * Return Value:
+    * a new flattened list,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, if `input_list` is not a list, 
or if `depth` is
+      not an integer.
+
+ * Example:
+
+        array_flatten([2, null, [5, 6], 3, missing], 1);
+
+ * The expected result is:
+
+        [ 2, null, 5, 6, 3, null ]
+
+### array_ifnull ###
+ * Syntax:
+
+        array_ifnull(input_list)
+
+ * Returns the first item of the input list that is neither `null` nor 
`missing`.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+ * Return Value:
+    * the first item that is neither `null` nor `missing`,
+    * `missing` if the argument is a `missing` value,
+    * `null` if the argument is a `null` value, is not a list, is empty, or 
holds only `null`
+      and `missing` items.
+
+ * Example:
+
+        array_ifnull([null, null, 3, 4.9, null]);
+
+ * The expected result is:
+
+        3
+
+### array_insert ###
+ * Syntax:
+
+        array_insert(input_list, position, val1, val2, ...)
+
+ * Returns a new list with the values inserted at the given position.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `position` : the position to insert at. For a list of length `n` the 
valid positions are
+      `0` through `n` and `-1` through `-n`. The only valid position in an 
empty list is `0`.
+    * `val1`, `val2`, ... : values to insert. `null` values are inserted as 
`null`.
+ * Return Value:
+    * a new list with the values inserted,
+    * `missing` if any argument is a `missing` value,
+    * `null` if `input_list` is a `null` value or is not a list, or if 
`position` is a `null`
+      value, is not an integer, or is out of bounds.
+
+ * Example:
+
+        array_insert([1, 2, 3], -1, "a", "b");
+
+ * The expected result is:
+
+        [ 1, 2, "a", "b", 3 ]
+
+### array_intersect ###
+ * Syntax:
+
+        array_intersect(list1, list2, ...)
+
+ * Returns a new list with the items that are present in every input list. 
`null` and `missing`
+   items are ignored.
+ * Arguments:
+    * `list1`, `list2`, ... : lists of the same kind.
+ * Return Value:
+    * a new list with the common items,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value or is not a list,
+    * a type error if the input lists are not all of the same kind, that is, 
if an `array` is
+      mixed with a `multiset`.
+
+ * Example:
+
+        array_intersect([null, 2, missing], [3, missing, 2, null]);
+
+ * The expected result is:
+
+        [ 2 ]
+
+### array_move ###
+ * Syntax:
+
+        array_move(ordered_list, old_position, new_position)
+
+ * Returns a new list with the item at `old_position` moved to `new_position`, 
shifting the
+   items in between accordingly.
+ * Arguments:
+    * `ordered_list` : an `array`.
+    * `old_position` : the position of the item to move.
+    * `new_position` : the position the item should end up at.
+ * Return Value:
+    * a new list with the item moved,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, if `ordered_list` is not an 
`array`, or if
+      either position is not an integer or is out of bounds.
+
+ * Example:
+
+        array_move([0, 1, 2, 3, 4, 5], 1, 3);
+
+ * The expected result is:
+
+        [ 0, 2, 3, 1, 4, 5 ]
+
+### array_position ###
+ * Syntax:
+
+        array_position(input_list, value)
+
+ * Returns the position of the given value in the input list.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `value` : the value to look for.
+ * Return Value:
+    * the 0-based position of `value`, or `-1` if it is not found,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, or if `input_list` is not a 
list.
+
+ * Example:
+
+        array_position([3, "sth", 98, 40], 98);
+
+ * The expected result is:
+
+        2
+
+### array_prepend ###
+ * Syntax:
+
+        array_prepend(val1, val2, ..., input_list)
+
+ * Returns a new list with the values prepended to the items of the input 
list, which is the
+   last argument.
+ * Arguments:
+    * `val1`, `val2`, ... : values to prepend. `null` values are prepended as 
`null`.
+    * `input_list` : an `array` or `multiset`.
+ * Return Value:
+    * a new list with the values prepended,
+    * `missing` if any argument is a `missing` value,
+    * `null` if `input_list` is a `null` value or is not a list.
+
+ * Example:
+
+        array_prepend(5, 10, null, "sth", [77, "val"]);
+
+ * The expected result is:
+
+        [ 5, 10, null, "sth", 77, "val" ]
+
+### array_put ###
+ * Syntax:
+
+        array_put(input_list, val1, val2, ...)
+
+ * Returns a new list with the values appended to the items of the input list, 
skipping values
+   that the list already holds.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `val1`, `val2`, ... : values to append. They cannot be `null`.
+ * Return Value:
+    * a new list with the missing values appended,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, or if `input_list` is not a 
list.
+
+ * Example:
+
+        array_put([3, 2, "sth"], 3, 9, 9, 3, "sth");
+
+ * The expected result is:
+
+        [ 3, 2, "sth", 9, 9 ]
+
+### array_range ###
+ * Syntax:
+
+        array_range(start, end[, step])
+
+ * Returns a new ordered list of numbers from `start` up to but not including 
`end`. An empty
+   list is returned when no sequence can be formed, as in `array_range(10, 3, 
4)` or
+   `array_range(1, 6, 0)`.
+ * Arguments:
+    * `start` : the first number of the sequence.
+    * `end` : the number the sequence stops before.
+    * `step` : an optional increment, `1` by default. It may be negative.
+ * Return Value:
+    * a new `array` of `bigint` items, or of `double` items when any argument 
is a
+      floating-point number,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, is not numeric, or is `NaN` or 
infinity.
+
+ * Example:
+
+        array_range(0, 25, 5);
+
+ * The expected result is:
+
+        [ 0, 5, 10, 15, 20 ]
+
+### array_remove ###
+ * Syntax:
+
+        array_remove(input_list, val1, val2, ...)
+
+ * Returns a new list with every occurrence of the given values removed.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `val1`, `val2`, ... : values to remove. They cannot be `null`.
+ * Return Value:
+    * a new list without the given values,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, or if `input_list` is not a 
list.
+
+ * Example:
+
+        array_remove([3, 2, "sth"], 3, 9, 9, 3, "sth");
+
+ * The expected result is:
+
+        [ 2 ]
+
+### array_repeat ###
+ * Syntax:
+
+        array_repeat(value, count)
+
+ * Returns a new ordered list holding the given value repeated `count` times.
+ * Arguments:
+    * `value` : the value to repeat.
+    * `count` : a non-negative integer giving how many copies to produce.
+ * Return Value:
+    * a new `array` with `count` copies of `value`,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, or if `count` is negative, is 
not an integer, or
+      is `NaN` or infinity.
+
+ * Example:
+
+        array_repeat([1, 2], 3);
+
+ * The expected result is:
+
+        [ [ 1, 2 ], [ 1, 2 ], [ 1, 2 ] ]
+
+### array_replace ###
+ * Syntax:
+
+        array_replace(input_list, old_value, new_value[, max_occurrences])
+
+ * Returns a new list with occurrences of `old_value` replaced by `new_value`.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `old_value` : the value to replace. It cannot be `null`.
+    * `new_value` : the replacement value. It may be `null`.
+    * `max_occurrences` : an optional integer limiting how many occurrences 
are replaced. All
+      occurrences are replaced by default, or when the limit is negative.
+ * Return Value:
+    * a new list with the replacements applied,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument other than `new_value` is a `null` value, if 
`input_list` is not a
+      list, or if `max_occurrences` is not an integer.
+
+ * Example:
+
+        array_replace([3, 1, 1, 2, 2, 1, 2, 1, 1], 1, -5, 3);
+
+ * The expected result is:
+
+        [ 3, -5, -5, 2, 2, -5, 2, 1, 1 ]
+
+### array_reverse ###
+ * Syntax:
+
+        array_reverse(input_list)
+
+ * Returns a new list with the items of the input list in reverse order. 
`null` and `missing`
+   items are preserved.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+ * Return Value:
+    * a new list in reverse order,
+    * `missing` if the argument is a `missing` value,
+    * `null` if the argument is a `null` value or is not a list.
+
+ * Example:
+
+        array_reverse([5, 7.5, 19, "John"]);
+
+ * The expected result is:
+
+        [ "John", 19, 7.5, 5 ]
+
+### array_slice ###
+ * Syntax:
+
+        array_slice(input_list, start[, end])
+
+ * Returns a new list with the items from position `start` up to but not 
including position
+   `end`. When `end` is omitted, the slice runs to the end of the list.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+    * `start` : the position of the first item of the slice.
+    * `end` : an optional position, the first one that is not part of the 
slice.
+ * Return Value:
+    * a new list holding the requested slice,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, if `input_list` is not a list, 
if a position is
+      not an integer or is past the end of the list, or if `end` is smaller 
than `start`.
+
+ * Example:
+
+        array_slice([1, 2, 3, 4], -3, 3);
+
+ * The expected result is:
+
+        [ 2, 3 ]
+
+### array_sort ###
+ * Syntax:
+
+        array_sort(input_list)
+
+ * Returns a new list with the items of the input list in ascending order. 
`missing` items are
+   returned as `null`, and `null` items sort before all others.
+ * Arguments:
+    * `input_list` : an `array` or `multiset`.
+ * Return Value:
+    * a new list in ascending order,
+    * `missing` if the argument is a `missing` value,
+    * `null` if the argument is a `null` value or is not a list.
+
+ * Example:
+
+        array_sort([19, missing, 7, null, 5, null]);
+
+ * The expected result is:
+
+        [ null, null, null, 5, 7, 19 ]
+
+### array_star ###
+ * Syntax:
+
+        array_star(ordered_list)
+
+ * Returns an object built from a list of objects, where each field holds the 
list of the values
+   that field takes across the input objects. A field absent from one of the 
input objects
+   contributes a `null` at that position. The fields of the result are ordered 
by name, while
+   the values of each field keep the order of the input list.
+ * Arguments:
+    * `ordered_list` : an `array` of objects.
+ * Return Value:
+    * a new object,
+    * `missing` if the argument is a `missing` value, or if the input list 
holds no objects with
+      fields,
+    * `null` if the argument is a `null` value or is not an `array`.
+
+ * Example:
+
+        array_star([{"a": 1, "c": 5}, {"a": 9, "b": 4}]);
+
+ * The expected result is:
+
+        { "a": [ 1, 9 ], "b": [ null, 4 ], "c": [ 5, null ] }
+
+### array_swap ###
+ * Syntax:
+
+        array_swap(ordered_list, position1, position2)
+
+ * Returns a new list with the items at the two given positions exchanged.
+ * Arguments:
+    * `ordered_list` : an `array`.
+    * `position1`, `position2` : the positions of the two items to exchange.
+ * Return Value:
+    * a new list with the two items exchanged,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value, if `ordered_list` is not an 
`array`, or if
+      either position is not an integer or is out of bounds.
+
+ * Example:
+
+        array_swap([0, 1, 2, 3, 4, 5], 1, 3);
+
+ * The expected result is:
+
+        [ 0, 3, 2, 1, 4, 5 ]
+
+### array_symdiff ###
+ * Syntax:
+
+        array_symdiff(list1, list2, ...)
+
+ * Returns a new list with the items that occur in exactly one of the input 
lists. `missing`
+   items are treated as `null`.
+ * Arguments:
+    * `list1`, `list2`, ... : lists of the same kind.
+ * Return Value:
+    * a new list with the symmetric difference of the input lists,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value or is not a list,
+    * a type error if the input lists are not all of the same kind, that is, 
if an `array` is
+      mixed with a `multiset`, or if any item is a list or an object, since 
deep equality is not
+      supported here.
+
+ * Example:
+
+        array_symdiff([null, 2, 3], [missing, 3]);
+
+ * The expected result is:
+
+        [ 2, null, null ]
+
+### array_symdiffn ###
+ * Syntax:
+
+        array_symdiffn(list1, list2, ...)
+
+ * Returns a new list with the items that occur in an odd number of the input 
lists. `missing`
+   items are treated as `null`.
+ * Arguments:
+    * `list1`, `list2`, ... : lists of the same kind.
+ * Return Value:
+    * a new list with the items that occur an odd number of times,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value or is not a list,
+    * a type error if the input lists are not all of the same kind, that is, 
if an `array` is
+      mixed with a `multiset`.
+
+ * Example:
+
+        array_symdiffn([null, 2, 3], [missing, 3]);
+
+ * The expected result is:
+
+        [ 2, null, null ]
+
+### array_union ###
+ * Syntax:
+
+        array_union(list1, list2, ...)
+
+ * Returns a new list with the union of the input lists and no duplicates. 
`missing` items are
+   treated as `null`.
+ * Arguments:
+    * `list1`, `list2`, ... : lists of the same kind.
+ * Return Value:
+    * a new list with the union of the input lists,
+    * `missing` if any argument is a `missing` value,
+    * `null` if any argument is a `null` value or is not a list,
+    * a type error if the input lists are not all of the same kind, that is, 
if an `array` is
+      mixed with a `multiset`.
+
+ * Example:
+
+        array_union([null, 2], [missing, 3, null]);
+
+ * The expected result is:
+
+        [ null, 2, null, 3 ]
+

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21622?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I7a2b7668d54b69d541b3dc2aaf2d44201f68ff40
Gerrit-Change-Number: 21622
Gerrit-PatchSet: 1
Gerrit-Owner: Vivek Gangavarapu <[email protected]>

Reply via email to