Apache DataFusion SQL Query Engine
Minor: improve scalar functions document (#9029)
Alex Huang3eb7080671e0
diff --git a/datafusion/expr/src/expr_fn.rs b/datafusion/expr/src/expr_fn.rsindex 006b5f10f1..a0223fd953 100644--- a/datafusion/expr/src/expr_fn.rs+++ b/datafusion/expr/src/expr_fn.rs@@ -612,7 +612,7 @@ scalar_expr!(ArrayEmpty,array_empty,array,- "returns 1 for an empty array or 0 for a non-empty array."+ "returns true for an empty array or false for a non-empty array.");scalar_expr!(ArrayHasAll,diff --git a/docs/source/user-guide/sql/scalar_functions.md b/docs/source/user-guide/sql/scalar_functions.mdindex 4ad58a5067..04044560f7 100644--- a/docs/source/user-guide/sql/scalar_functions.md+++ b/docs/source/user-guide/sql/scalar_functions.md@@ -1765,11 +1765,16 @@ from_unixtime(expression)- [list_dims](#list_dims)- [list_element](#list_element)- [list_extract](#list_extract)+- [list_has](#list_has)+- [list_has_all](#list_has_all)+- [list_has_any](#list_has_any)- [list_indexof](#list_indexof)- [list_join](#list_join)- [list_length](#list_length)- [list_ndims](#list_ndims)- [list_prepend](#list_prepend)+- [list_pop_back](#list_pop_back)+- [list_pop_front](#list_pop_front)- [list_position](#list_position)- [list_positions](#list_positions)- [list_push_back](#list_push_back)@@ -1901,6 +1906,10 @@ array_has(array, element)- **element**: Scalar or Array expression.Can be a constant, column, or function, and any combination of array operators.+#### Aliases++- list_has+### `array_has_all`Returns true if all elements of sub-array exist in array@@ -1916,6 +1925,10 @@ array_has_all(array, sub-array)- **sub-array**: Array expression.Can be a constant, column, or function, and any combination of array operators.+#### Aliases++- list_has_all+### `array_has_any`Returns true if any elements exist in both arrays@@ -1931,6 +1944,10 @@ array_has_any(array, sub-array)- **sub-array**: Array expression.Can be a constant, column, or function, and any combination of array operators.+#### Aliases++- list_has_any+### `array_dims`Returns an array of the array's dimensions.@@ -1990,8 +2007,6 @@ array_element(array, index)- list_element- list_extract-### `array_empty`-### `array_extract`_Alias of [array_element](#array_element)._@@ -2150,6 +2165,10 @@ array_pop_front(array)+-------------------------------+```+#### Aliases++- list_pop_front+### `array_pop_back`Returns the array without the last element.@@ -2174,6 +2193,10 @@ array_pop_back(array)+-------------------------------+```+#### Aliases++- list_pop_back+### `array_position`Returns the position of the first occurrence of the specified element in the array.@@ -2278,6 +2301,10 @@ array_repeat(element, count)+------------------------------------+```+#### Aliases++- list_repeat+### `array_remove`Removes the first element from the array equal to the given value.@@ -2459,12 +2486,22 @@ array_replace_all(array, from, to)### `array_slice`-Returns a slice of the array.+Returns a slice of the array based on 1-indexed start and end positions.```array_slice(array, begin, end)```+#### Arguments++- **array**: Array expression.+ Can be a constant, column, or function, and any combination of array operators.+- **begin**: Index of the first element.+ If negative, it counts backward from the end of the array.+- **end**: Index of the last element.+ If negative, it counts backward from the end of the array.+- **stride**: Stride of the array slice. The default is 1.+#### Example```@@ -2663,6 +2700,18 @@ _Alias of [array_element](#array_element).__Alias of [array_element](#array_element)._+### `list_has`++_Alias of [array_has](#array_has)._++### `list_has_all`++_Alias of [array_has_all](#array_has_all)._++### `list_has_any`++_Alias of [array_has_any](#array_has_any)._+### `list_indexof`_Alias of [array_position](#array_position)._@@ -2683,6 +2732,14 @@ _Alias of [array_ndims](#array_ndims).__Alias of [array_prepend](#array_prepend)._+### `list_pop_back`++_Alias of [array_pop_back](#array_pop_back)._++### `list_pop_front`++_Alias of [array_pop_front](#array_pop_front)._+### `list_position`_Alias of [array_position](#array_position)._