Skip to content

Commit

Permalink
Remove first_value and last_value since these are already implemented…
Browse files Browse the repository at this point in the history
… in the aggregate functions
  • Loading branch information
timsaucer committed Jul 24, 2024
1 parent 12b572b commit 404f394
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions datafusion/expr/src/window_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ pub fn lead(
))
}

/// Create an expression to represent the `first_value` window function
pub fn first_value(arg: Expr) -> Expr {
Expr::WindowFunction(WindowFunction::new(BuiltInWindowFunction::FirstValue, vec![arg]))
}

/// Create an expression to represent the `last_value` window function
pub fn last_value(arg: Expr) -> Expr {
Expr::WindowFunction(WindowFunction::new(BuiltInWindowFunction::LastValue, vec![arg]))
}

/// Create an expression to represent the `nth_value` window function
pub fn nth_value(arg: Expr, n: i64) -> Expr {
Expr::WindowFunction(WindowFunction::new(BuiltInWindowFunction::NthValue, vec![arg, n.lit()]))
Expand Down

0 comments on commit 404f394

Please sign in to comment.