Skip to content

Commit

Permalink
migrate functions.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Oct 10, 2024
1 parent 56c7012 commit 6a36cfd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use datafusion::common::{Column, ScalarValue, TableReference};
use datafusion::execution::FunctionRegistry;
use datafusion::functions;
use datafusion::functions_aggregate;
use datafusion::functions_window;
use datafusion::logical_expr::expr::Alias;
use datafusion::logical_expr::sqlparser::ast::NullTreatment as DFNullTreatment;
use datafusion::logical_expr::{
Expand Down Expand Up @@ -776,7 +777,7 @@ pub fn row_number(
partition_by: Option<Vec<PyExpr>>,
order_by: Option<Vec<PySortExpr>>,
) -> PyResult<PyExpr> {
let window_fn = datafusion::functions_window::expr_fn::row_number();
let window_fn = functions_window::expr_fn::row_number();

add_builder_fns_to_window(window_fn, partition_by, None, order_by, None)
}
Expand All @@ -787,7 +788,7 @@ pub fn rank(
partition_by: Option<Vec<PyExpr>>,
order_by: Option<Vec<PySortExpr>>,
) -> PyResult<PyExpr> {
let window_fn = window_function::rank();
let window_fn = functions_window::expr_fn::rank();

add_builder_fns_to_window(window_fn, partition_by, None, order_by, None)
}
Expand All @@ -798,7 +799,7 @@ pub fn dense_rank(
partition_by: Option<Vec<PyExpr>>,
order_by: Option<Vec<PySortExpr>>,
) -> PyResult<PyExpr> {
let window_fn = window_function::dense_rank();
let window_fn = functions_window::expr_fn::dense_rank();

add_builder_fns_to_window(window_fn, partition_by, None, order_by, None)
}
Expand All @@ -809,7 +810,7 @@ pub fn percent_rank(
partition_by: Option<Vec<PyExpr>>,
order_by: Option<Vec<PySortExpr>>,
) -> PyResult<PyExpr> {
let window_fn = window_function::percent_rank();
let window_fn = functions_window::expr_fn::percent_rank();

add_builder_fns_to_window(window_fn, partition_by, None, order_by, None)
}
Expand Down

0 comments on commit 6a36cfd

Please sign in to comment.