@@ -21,7 +21,10 @@ use crate::{expr::WindowFunction, BuiltInWindowFunction, Expr, Literal};
2121
2222/// Create an expression to represent the `row_number` window function
2323pub fn row_number ( ) -> Expr {
24- Expr :: WindowFunction ( WindowFunction :: new ( BuiltInWindowFunction :: RowNumber , vec ! [ ] ) )
24+ Expr :: WindowFunction ( WindowFunction :: new (
25+ BuiltInWindowFunction :: RowNumber ,
26+ vec ! [ ] ,
27+ ) )
2528}
2629
2730/// Create an expression to represent the `rank` window function
@@ -31,12 +34,18 @@ pub fn rank() -> Expr {
3134
3235/// Create an expression to represent the `dense_rank` window function
3336pub fn dense_rank ( ) -> Expr {
34- Expr :: WindowFunction ( WindowFunction :: new ( BuiltInWindowFunction :: DenseRank , vec ! [ ] ) )
37+ Expr :: WindowFunction ( WindowFunction :: new (
38+ BuiltInWindowFunction :: DenseRank ,
39+ vec ! [ ] ,
40+ ) )
3541}
3642
3743/// Create an expression to represent the `percent_rank` window function
3844pub fn percent_rank ( ) -> Expr {
39- Expr :: WindowFunction ( WindowFunction :: new ( BuiltInWindowFunction :: PercentRank , vec ! [ ] ) )
45+ Expr :: WindowFunction ( WindowFunction :: new (
46+ BuiltInWindowFunction :: PercentRank ,
47+ vec ! [ ] ,
48+ ) )
4049}
4150
4251/// Create an expression to represent the `cume_dist` window function
@@ -83,5 +92,8 @@ pub fn lead(
8392
8493/// Create an expression to represent the `nth_value` window function
8594pub fn nth_value ( arg : Expr , n : i64 ) -> Expr {
86- Expr :: WindowFunction ( WindowFunction :: new ( BuiltInWindowFunction :: NthValue , vec ! [ arg, n. lit( ) ] ) )
95+ Expr :: WindowFunction ( WindowFunction :: new (
96+ BuiltInWindowFunction :: NthValue ,
97+ vec ! [ arg, n. lit( ) ] ,
98+ ) )
8799}
0 commit comments