Skip to content

Commit 135c0fb

Browse files
committed
adjust doc
1 parent d265045 commit 135c0fb

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

docs/source/user-guide/sql/scalar_functions.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3234,6 +3234,8 @@ _Alias of [current_date](#current_date)._
32343234

32353235
## Array Functions
32363236

3237+
- [any_match](#any_match)
3238+
- [array_any_match](#array_any_match)
32373239
- [array_any_value](#array_any_value)
32383240
- [array_append](#array_append)
32393241
- [array_cat](#array_cat)
@@ -3285,6 +3287,7 @@ _Alias of [current_date](#current_date)._
32853287
- [empty](#empty)
32863288
- [flatten](#flatten)
32873289
- [generate_series](#generate_series)
3290+
- [list_any_match](#list_any_match)
32883291
- [list_any_value](#list_any_value)
32893292
- [list_append](#list_append)
32903293
- [list_cat](#list_cat)
@@ -3335,6 +3338,39 @@ _Alias of [current_date](#current_date)._
33353338
- [string_to_array](#string_to_array)
33363339
- [string_to_list](#string_to_list)
33373340

3341+
### `any_match`
3342+
3343+
_Alias of [array_any_match](#array_any_match)._
3344+
3345+
### `array_any_match`
3346+
3347+
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.
3348+
3349+
```sql
3350+
any_match(array, predicate)
3351+
```
3352+
3353+
#### Arguments
3354+
3355+
- **array**: Array expression. Can be a constant, column, or function, and any combination of array operators.
3356+
- **predicate**: Lambda predicate that returns a boolean
3357+
3358+
#### Example
3359+
3360+
```sql
3361+
> select any_match([1, 2, 3], x -> x > 2);
3362+
+----------------------------------+
3363+
| any_match([1, 2, 3], x -> x > 2) |
3364+
+----------------------------------+
3365+
| true |
3366+
+----------------------------------+
3367+
```
3368+
3369+
#### Aliases
3370+
3371+
- any_match
3372+
- list_any_match
3373+
33383374
### `array_any_value`
33393375

33403376
Returns the first non-null element in the array.
@@ -4607,6 +4643,10 @@ generate_series(start, stop[, step])
46074643
+------------------------------------+
46084644
```
46094645

4646+
### `list_any_match`
4647+
4648+
_Alias of [array_any_match](#array_any_match)._
4649+
46104650
### `list_any_value`
46114651

46124652
_Alias of [array_any_value](#array_any_value)._

0 commit comments

Comments
 (0)