polars_plan/dsl/functions/
index.rsuse super::*;
#[cfg(feature = "range")]
pub fn arg_sort_by<E: AsRef<[Expr]>>(by: E, sort_options: SortMultipleOptions) -> Expr {
let e = &by.as_ref()[0];
let name = expr_output_name(e).unwrap();
int_range(lit(0 as IdxSize), len().cast(IDX_DTYPE), 1, IDX_DTYPE)
.sort_by(by, sort_options)
.alias(name)
}
#[cfg(feature = "arg_where")]
pub fn arg_where<E: Into<Expr>>(condition: E) -> Expr {
let condition = condition.into();
Expr::Function {
input: vec![condition],
function: FunctionExpr::ArgWhere,
options: FunctionOptions {
collect_groups: ApplyOptions::GroupWise,
..Default::default()
},
}
}