polars_plan/dsl/functions/
index.rs1use super::*;
2
3#[cfg(feature = "range")]
9pub fn arg_sort_by<E: AsRef<[Expr]>>(by: E, sort_options: SortMultipleOptions) -> Expr {
10 let e = &by.as_ref()[0];
11 let name = expr_output_name(e).unwrap();
12 int_range(lit(0 as IdxSize), len().cast(IDX_DTYPE), 1, IDX_DTYPE)
13 .sort_by(by, sort_options)
14 .alias(name)
15}
16
17#[cfg(feature = "arg_where")]
18pub fn arg_where<E: Into<Expr>>(condition: E) -> Expr {
20 condition.into().map_unary(FunctionExpr::ArgWhere)
21}