Skip to content

Commit

Permalink
Update description
Browse files Browse the repository at this point in the history
  • Loading branch information
beliefer committed Feb 4, 2020
1 parent 2ee523b commit c87069f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,19 @@ case class Lag(input: Expression, offset: Expression, default: Expression)
/**
* The NthValue function returns the value of `input` at the row that is the `offset`th row of
* the window frame (counting from 1). Offsets start at 0, which is the current row. When the
* value of `input` is null at the `offset`th row, null is returned.
* value of `input` is null at the `offset`th row or there is no such an `offset`th row, null
* is returned.
*
* @param input expression to evaluate `offset`th row of the window frame.
* @param offset rows to jump ahead in the partition.
*/
@ExpressionDescription(
usage = """
_FUNC_(input[, offset]) - Returns the value of `input` at the row that is the`offset`th row
of the window frame (counting from 1). If the value of `input` at the `offset`th row is
null, null is returned. If there is no such an offset row (e.g., when the offset is 10,
size of the window frame less than 10), null is returned.
""")
case class NthValue(input: Expression, offset: Expression)
extends OffsetWindowFunction {

Expand Down

0 comments on commit c87069f

Please sign in to comment.