Skip to content

Commit

Permalink
Merge pull request #4056 from szarnyasg/functions
Browse files Browse the repository at this point in the history
Format NULLs
  • Loading branch information
szarnyasg authored Nov 13, 2024
2 parents 7220608 + cbb1304 commit f205482
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/sql/functions/aggregates.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ The table below shows the available general aggregate functions.

<div class="nostroke_table"></div>

| **Description** | Returns the first non-null value from `arg`. This function is [affected by ordering](#order-by-clause-in-aggregate-functions). |
| **Description** | Returns the first non-`NULL` value from `arg`. This function is [affected by ordering](#order-by-clause-in-aggregate-functions). |
| **Example** | `any_value(A)` |
| **Alias(es)** | - |

#### `arbitrary(arg)`

<div class="nostroke_table"></div>

| **Description** | Returns the first value (null or non-null) from `arg`. This function is [affected by ordering](#order-by-clause-in-aggregate-functions). |
| **Description** | Returns the first value (`NULL` or non-`NULL`) from `arg`. This function is [affected by ordering](#order-by-clause-in-aggregate-functions). |
| **Example** | `arbitrary(A)` |
| **Alias(es)** | `first(A)` |

Expand Down
6 changes: 3 additions & 3 deletions docs/sql/functions/char.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ This section describes functions and operators for examining and manipulating [`

<div class="nostroke_table"></div>

| **Description** | Concatenate two strings. Any NULL input results in NULL. See also [`concat(string, ...)`](#concatstring-). |
| **Description** | Concatenate two strings. Any `NULL` input results in `NULL`. See also [`concat(string, ...)`](#concatstring-). |
| **Example** | `'Duck' || 'DB'` |
| **Result** | `DuckDB` |

Expand Down Expand Up @@ -220,15 +220,15 @@ SELECT

<div class="nostroke_table"></div>

| **Description** | Concatenate many strings, separated by `separator`. NULL inputs are skipped. |
| **Description** | Concatenate many strings, separated by `separator`. `NULL` inputs are skipped. |
| **Example** | `concat_ws(', ', 'Banana', 'Apple', NULL, 'Melon')` |
| **Result** | `Banana, Apple, Melon` |

#### `concat(string, ...)`

<div class="nostroke_table"></div>

| **Description** | Concatenate many strings. NULL inputs are skipped. See also [`string || string`](#string--string). |
| **Description** | Concatenate many strings. `NULL` inputs are skipped. See also [`string || string`](#string--string). |
| **Example** | `concat('Hello', ' ', NULL, 'World')` |
| **Result** | `Hello World` |

Expand Down
6 changes: 3 additions & 3 deletions docs/sql/functions/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ title: List Functions

<div class="nostroke_table"></div>

| **Description** | Concatenate two lists. NULL inputs are skipped. See also `||` |
| **Description** | Concatenate two lists. `NULL` inputs are skipped. See also `||` |
| **Example** | `list_concat([2, 3], [4, 5, 6])` |
| **Result** | `[2, 3, 4, 5, 6]` |
| **Aliases** | `list_cat`, `array_concat`, `array_cat` |
Expand Down Expand Up @@ -411,8 +411,8 @@ The following operators are supported for lists:
| `&&` | Alias for [`list_has_any`](#list_has_anylist1-list2). | `[1, 2, 3, 4, 5] && [2, 5, 5, 6]` | `true` |
| `@>` | Alias for [`list_has_all`](#list_has_alllist-sub-list), where the list on the **right** of the operator is the sublist. | `[1, 2, 3, 4] @> [3, 4, 3]` | `true` |
| `<@` | Alias for [`list_has_all`](#list_has_alllist-sub-list), where the list on the **left** of the operator is the sublist. | `[1, 4] <@ [1, 2, 3, 4]` | `true` |
| `||` | Similar to [`list_concat`](#list_concatlist1-list2), except any NULL input results in NULL. | `[1, 2, 3] || [4, 5, 6]` | `[1, 2, 3, 4, 5, 6]` |
| `<=>` | Alias for [`list_cosine_distance`](#list_cosine_distancelist1-list2). | `[1, 2, 3] <=> [1, 2, 5]` | `0.007416606` |
| `||` | Similar to [`list_concat`](#list_concatlist1-list2), except any `NULL` input results in `NULL`. | `[1, 2, 3] || [4, 5, 6]` | `[1, 2, 3, 4, 5, 6]` |
| `<=>` | Alias for [`list_cosine_distance`](#list_cosine_distancelist1-list2). | `[1, 2, 3] <=> [1, 2, 5]` | `0.007416606` |
| `<->` | Alias for [`list_distance`](#list_distancelist1-list2). | `[1, 2, 3] <-> [1, 2, 5]` | `2.0` |

<!-- markdownlint-enable MD056 -->
Expand Down

0 comments on commit f205482

Please sign in to comment.