Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datafusion/functions-nested/src/array_any_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ make_higher_order_function_expr_and_func!(

#[user_doc(
doc_section(label = "Array Functions"),
description = "Returns whether any elements of an array match the given predicate. Returns true if one or more elements match, false if none match (including empty arrays), and null if the predicate returns null for some elements and false for all others.",
description = "Returns whether any elements of an array match the given predicate. Returns true if one or more elements match, false if none match (including empty arrays), and null if the predicate returns null for some elements and false for all others. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.",
syntax_example = "any_match(array, predicate)",
sql_example = r#"```sql
> select any_match([1, 2, 3], x -> x > 2);
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions-nested/src/array_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ make_higher_order_function_expr_and_func!(

#[user_doc(
doc_section(label = "Array Functions"),
description = "filters the values of an array using a boolean lambda",
description = "filters the values of an array using a boolean lambda. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.",
syntax_example = "array_filter(array, x -> x > 2)",
sql_example = r#"```sql
> select array_filter([1, 2, 3, 4, 5], x -> x > 2);
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions-nested/src/array_first.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ make_higher_order_function_expr_and_func!(

#[user_doc(
doc_section(label = "Array Functions"),
description = "Returns the first element of an array that satisfies the given predicate. Returns null if the array is empty or no element matches. A predicate that returns null for an element is treated as not matching.",
description = "Returns the first element of an array that satisfies the given predicate. Returns null if the array is empty or no element matches. A predicate that returns null for an element is treated as not matching. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.",
syntax_example = "array_first(array, predicate)",
sql_example = r#"```sql
> select array_first([1, 2, 3, 4], x -> x > 2);
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions-nested/src/array_transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ make_higher_order_function_expr_and_func!(

#[user_doc(
doc_section(label = "Array Functions"),
description = "transforms the values of an array",
description = "transforms the values of an array. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.",
syntax_example = "array_transform(array, lambda)",
sql_example = r#"```sql
> select array_transform([1, 2, 3, 4, 5], x -> x*2);
Expand Down
8 changes: 4 additions & 4 deletions docs/source/user-guide/sql/scalar_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3411,7 +3411,7 @@ array_add(array1, array2)

### `array_any_match`

Returns whether any elements of an array match the given predicate. Returns true if one or more elements match, false if none match (including empty arrays), and null if the predicate returns null for some elements and false for all others.
Returns whether any elements of an array match the given predicate. Returns true if one or more elements match, false if none match (including empty arrays), and null if the predicate returns null for some elements and false for all others. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.

```sql
any_match(array, predicate)
Expand Down Expand Up @@ -3743,7 +3743,7 @@ _Alias of [array_element](#array_element)._

### `array_filter`

filters the values of an array using a boolean lambda
filters the values of an array using a boolean lambda. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.

```sql
array_filter(array, x -> x > 2)
Expand Down Expand Up @@ -3771,7 +3771,7 @@ array_filter(array, x -> x > 2)

### `array_first`

Returns the first element of an array that satisfies the given predicate. Returns null if the array is empty or no element matches. A predicate that returns null for an element is treated as not matching.
Returns the first element of an array that satisfies the given predicate. Returns null if the array is empty or no element matches. A predicate that returns null for an element is treated as not matching. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.

```sql
array_first(array, predicate)
Expand Down Expand Up @@ -4707,7 +4707,7 @@ array_to_string(array, delimiter[, null_string])

### `array_transform`

transforms the values of an array
transforms the values of an array. Lambda expressions require a dialect that supports them; set `datafusion.sql_parser.dialect` to `DuckDB` because the default dialect does not parse the `->` syntax.

```sql
array_transform(array, lambda)
Expand Down