Skip to content

Commit

Permalink
Merge branch 'main' into gt-e6c16b36-c06c-4066-b6de-cd578443f15d
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasen-Zhang authored Feb 24, 2025
2 parents 6e732cd + cc14b73 commit 01ed703
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: FIRST_VALUE

import FunctionDescription from '@site/src/components/FunctionDescription';

<FunctionDescription description="Introduced or updated: v1.2.568"/>
<FunctionDescription description="Introduced or updated: v1.2.697"/>

Returns the first value in the window frame.

Expand All @@ -19,7 +19,10 @@ See also:
FIRST_VALUE (expression) [ { IGNORE | RESPECT } NULLS ] OVER ([PARTITION BY partition_expression] ORDER BY order_expression [window_frame])
```

- `[ { IGNORE | RESPECT } NULLS ]`: This option controls how NULL values are handled within the window function. By default, `RESPECT NULLS` is used, meaning NULL values are included in the calculation and affect the result. When set to `IGNORE NULLS`, NULL values are excluded from consideration, and the function operates only on non-NULL values.
- `[ { IGNORE | RESPECT } NULLS ]`: Controls how NULL values are handled within the window function.
- By default, `RESPECT NULLS` is used, meaning NULL values are included in the calculation and affect the result.
- When set to `IGNORE NULLS`, NULL values are excluded from consideration, and the function operates only on non-NULL values.
- If all values in the window frame are NULL, the function returns NULL even when `IGNORE NULLS` is specified.

- For the syntax of window frame, see [Window Frame Syntax](index.md#window-frame-syntax).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: LAST_VALUE

import FunctionDescription from '@site/src/components/FunctionDescription';

<FunctionDescription description="Introduced or updated: v1.2.568"/>
<FunctionDescription description="Introduced or updated: v1.2.697"/>

Returns the last value in the window frame.

Expand All @@ -19,7 +19,10 @@ See also:
LAST_VALUE (expression) [ { IGNORE | RESPECT } NULLS ] OVER ([PARTITION BY partition_expression] ORDER BY order_expression [window_frame])
```

- `[ { IGNORE | RESPECT } NULLS ]`: This option controls how NULL values are handled within the window function. By default, `RESPECT NULLS` is used, meaning NULL values are included in the calculation and affect the result. When set to `IGNORE NULLS`, NULL values are excluded from consideration, and the function operates only on non-NULL values.
- `[ { IGNORE | RESPECT } NULLS ]`: Controls how NULL values are handled within the window function.
- By default, `RESPECT NULLS` is used, meaning NULL values are included in the calculation and affect the result.
- When set to `IGNORE NULLS`, NULL values are excluded from consideration, and the function operates only on non-NULL values.
- If all values in the window frame are NULL, the function returns NULL even when `IGNORE NULLS` is specified.

- For the syntax of window frame, see [Window Frame Syntax](index.md#window-frame-syntax).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: NTH_VALUE

import FunctionDescription from '@site/src/components/FunctionDescription';

<FunctionDescription description="Introduced or updated: v1.2.568"/>
<FunctionDescription description="Introduced or updated: v1.2.697"/>

Returns the value at the `N`-th position within the window frame, where `N` is a specified integer that determines the exact position of the value.

Expand All @@ -19,7 +19,10 @@ See also:
NTH_VALUE (expression, n) [ { IGNORE | RESPECT } NULLS ] OVER ([PARTITION BY partition_expression] ORDER BY order_expression [window_frame])
```

- `[ { IGNORE | RESPECT } NULLS ]`: This option controls how NULL values are handled within the window function. By default, `RESPECT NULLS` is used, meaning NULL values are included in the calculation and affect the result. When set to `IGNORE NULLS`, NULL values are excluded from consideration, and the function operates only on non-NULL values.
- `[ { IGNORE | RESPECT } NULLS ]`: Controls how NULL values are handled within the window function.
- By default, `RESPECT NULLS` is used, meaning NULL values are included in the calculation and affect the result.
- When set to `IGNORE NULLS`, NULL values are excluded from consideration, and the function operates only on non-NULL values.
- If all values in the window frame are NULL, the function returns NULL even when `IGNORE NULLS` is specified.

- For the syntax of window frame, see [Window Frame Syntax](index.md#window-frame-syntax).

Expand Down

0 comments on commit 01ed703

Please sign in to comment.