Path: blob/main/crates/polars-plan/src/dsl/function_expr/mod.rs
6940 views
#[cfg(feature = "dtype-array")]1mod array;2mod binary;3#[cfg(feature = "bitwise")]4mod bitwise;5mod boolean;6#[cfg(feature = "business")]7mod business;8#[cfg(feature = "dtype-categorical")]9mod cat;10#[cfg(feature = "cov")]11mod correlation;12#[cfg(feature = "temporal")]13mod datetime;14mod list;15mod pow;16#[cfg(feature = "random")]17mod random;18#[cfg(feature = "range")]19mod range;20#[cfg(feature = "rolling_window")]21mod rolling;22#[cfg(feature = "rolling_window_by")]23mod rolling_by;24#[cfg(feature = "strings")]25mod strings;26#[cfg(feature = "dtype-struct")]27mod struct_;28#[cfg(feature = "trigonometry")]29mod trigonometry;3031use std::fmt::{Display, Formatter};32use std::hash::{Hash, Hasher};3334#[cfg(feature = "dtype-array")]35pub use array::ArrayFunction;36#[cfg(feature = "cov")]37pub use correlation::CorrelationMethod;38pub use list::ListFunction;39pub use polars_core::datatypes::ReshapeDimension;40use polars_core::prelude::*;41#[cfg(feature = "random")]42pub use random::RandomMethod;43#[cfg(feature = "serde")]44use serde::{Deserialize, Serialize};4546pub use self::binary::BinaryFunction;47#[cfg(feature = "bitwise")]48pub use self::bitwise::BitwiseFunction;49pub use self::boolean::BooleanFunction;50#[cfg(feature = "business")]51pub use self::business::BusinessFunction;52#[cfg(feature = "dtype-categorical")]53pub use self::cat::CategoricalFunction;54#[cfg(feature = "temporal")]55pub use self::datetime::TemporalFunction;56pub use self::pow::PowFunction;57#[cfg(feature = "range")]58pub use self::range::RangeFunction;59#[cfg(feature = "rolling_window")]60pub use self::rolling::RollingFunction;61#[cfg(feature = "rolling_window_by")]62pub use self::rolling_by::RollingFunctionBy;63#[cfg(feature = "strings")]64pub use self::strings::StringFunction;65#[cfg(feature = "dtype-struct")]66pub use self::struct_::StructFunction;67#[cfg(feature = "trigonometry")]68pub use self::trigonometry::TrigonometricFunction;69use super::*;7071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]72#[cfg_attr(feature = "dsl-schema", derive(schemars::JsonSchema))]73#[derive(Clone, PartialEq, Debug)]74pub enum FunctionExpr {75// Namespaces76#[cfg(feature = "dtype-array")]77ArrayExpr(ArrayFunction),78BinaryExpr(BinaryFunction),79#[cfg(feature = "dtype-categorical")]80Categorical(CategoricalFunction),81ListExpr(ListFunction),82#[cfg(feature = "strings")]83StringExpr(StringFunction),84#[cfg(feature = "dtype-struct")]85StructExpr(StructFunction),86#[cfg(feature = "temporal")]87TemporalExpr(TemporalFunction),88#[cfg(feature = "bitwise")]89Bitwise(BitwiseFunction),9091// Other expressions92Boolean(BooleanFunction),93#[cfg(feature = "business")]94Business(BusinessFunction),95#[cfg(feature = "abs")]96Abs,97Negate,98#[cfg(feature = "hist")]99Hist {100bin_count: Option<usize>,101include_category: bool,102include_breakpoint: bool,103},104NullCount,105Pow(PowFunction),106#[cfg(feature = "row_hash")]107Hash(u64, u64, u64, u64),108#[cfg(feature = "arg_where")]109ArgWhere,110#[cfg(feature = "index_of")]111IndexOf,112#[cfg(feature = "search_sorted")]113SearchSorted {114side: SearchSortedSide,115descending: bool,116},117#[cfg(feature = "range")]118Range(RangeFunction),119#[cfg(feature = "trigonometry")]120Trigonometry(TrigonometricFunction),121#[cfg(feature = "trigonometry")]122Atan2,123#[cfg(feature = "sign")]124Sign,125FillNull,126FillNullWithStrategy(FillNullStrategy),127#[cfg(feature = "rolling_window")]128RollingExpr {129function: RollingFunction,130options: RollingOptionsFixedWindow,131},132#[cfg(feature = "rolling_window_by")]133RollingExprBy {134function_by: RollingFunctionBy,135options: RollingOptionsDynamicWindow,136},137Rechunk,138Append {139upcast: bool,140},141ShiftAndFill,142Shift,143DropNans,144DropNulls,145#[cfg(feature = "mode")]146Mode,147#[cfg(feature = "moment")]148Skew(bool),149#[cfg(feature = "moment")]150Kurtosis(bool, bool),151#[cfg(feature = "dtype-array")]152Reshape(Vec<ReshapeDimension>),153#[cfg(feature = "repeat_by")]154RepeatBy,155ArgUnique,156ArgMin,157ArgMax,158ArgSort {159descending: bool,160nulls_last: bool,161},162Product,163#[cfg(feature = "rank")]164Rank {165options: RankOptions,166seed: Option<u64>,167},168Repeat,169#[cfg(feature = "round_series")]170Clip {171has_min: bool,172has_max: bool,173},174#[cfg(feature = "dtype-struct")]175AsStruct,176#[cfg(feature = "top_k")]177TopK {178descending: bool,179},180#[cfg(feature = "top_k")]181TopKBy {182descending: Vec<bool>,183},184#[cfg(feature = "cum_agg")]185CumCount {186reverse: bool,187},188#[cfg(feature = "cum_agg")]189CumSum {190reverse: bool,191},192#[cfg(feature = "cum_agg")]193CumProd {194reverse: bool,195},196#[cfg(feature = "cum_agg")]197CumMin {198reverse: bool,199},200#[cfg(feature = "cum_agg")]201CumMax {202reverse: bool,203},204Reverse,205#[cfg(feature = "dtype-struct")]206ValueCounts {207sort: bool,208parallel: bool,209name: PlSmallStr,210normalize: bool,211},212#[cfg(feature = "unique_counts")]213UniqueCounts,214#[cfg(feature = "approx_unique")]215ApproxNUnique,216Coalesce,217#[cfg(feature = "diff")]218Diff(NullBehavior),219#[cfg(feature = "pct_change")]220PctChange,221#[cfg(feature = "interpolate")]222Interpolate(InterpolationMethod),223#[cfg(feature = "interpolate_by")]224InterpolateBy,225#[cfg(feature = "log")]226Entropy {227base: f64,228normalize: bool,229},230#[cfg(feature = "log")]231Log,232#[cfg(feature = "log")]233Log1p,234#[cfg(feature = "log")]235Exp,236Unique(bool),237#[cfg(feature = "round_series")]238Round {239decimals: u32,240mode: RoundMode,241},242#[cfg(feature = "round_series")]243RoundSF {244digits: i32,245},246#[cfg(feature = "round_series")]247Floor,248#[cfg(feature = "round_series")]249Ceil,250UpperBound,251LowerBound,252ConcatExpr(bool),253#[cfg(feature = "cov")]254Correlation {255method: correlation::CorrelationMethod,256},257#[cfg(feature = "peaks")]258PeakMin,259#[cfg(feature = "peaks")]260PeakMax,261#[cfg(feature = "cutqcut")]262Cut {263breaks: Vec<f64>,264labels: Option<Vec<PlSmallStr>>,265left_closed: bool,266include_breaks: bool,267},268#[cfg(feature = "cutqcut")]269QCut {270probs: Vec<f64>,271labels: Option<Vec<PlSmallStr>>,272left_closed: bool,273allow_duplicates: bool,274include_breaks: bool,275},276#[cfg(feature = "rle")]277RLE,278#[cfg(feature = "rle")]279RLEID,280ToPhysical,281#[cfg(feature = "random")]282Random {283method: random::RandomMethod,284seed: Option<u64>,285},286SetSortedFlag(IsSorted),287#[cfg(feature = "ffi_plugin")]288/// Creating this node is unsafe289/// This will lead to calls over FFI.290FfiPlugin {291flags: FunctionOptions,292/// Shared library.293lib: PlSmallStr,294/// Identifier in the shared lib.295symbol: PlSmallStr,296/// Pickle serialized keyword arguments.297kwargs: Arc<[u8]>,298},299300FoldHorizontal {301callback: PlanCallback<(Series, Series), Series>,302returns_scalar: bool,303return_dtype: Option<DataTypeExpr>,304},305ReduceHorizontal {306callback: PlanCallback<(Series, Series), Series>,307returns_scalar: bool,308return_dtype: Option<DataTypeExpr>,309},310#[cfg(feature = "dtype-struct")]311CumReduceHorizontal {312callback: PlanCallback<(Series, Series), Series>,313returns_scalar: bool,314return_dtype: Option<DataTypeExpr>,315},316#[cfg(feature = "dtype-struct")]317CumFoldHorizontal {318callback: PlanCallback<(Series, Series), Series>,319returns_scalar: bool,320return_dtype: Option<DataTypeExpr>,321include_init: bool,322},323324MaxHorizontal,325MinHorizontal,326SumHorizontal {327ignore_nulls: bool,328},329MeanHorizontal {330ignore_nulls: bool,331},332#[cfg(feature = "ewma")]333EwmMean {334options: EWMOptions,335},336#[cfg(feature = "ewma_by")]337EwmMeanBy {338half_life: Duration,339},340#[cfg(feature = "ewma")]341EwmStd {342options: EWMOptions,343},344#[cfg(feature = "ewma")]345EwmVar {346options: EWMOptions,347},348#[cfg(feature = "replace")]349Replace,350#[cfg(feature = "replace")]351ReplaceStrict {352return_dtype: Option<DataTypeExpr>,353},354GatherEvery {355n: usize,356offset: usize,357},358#[cfg(feature = "reinterpret")]359Reinterpret(bool),360ExtendConstant,361362RowEncode(RowEncodingVariant),363#[cfg(feature = "dtype-struct")]364RowDecode(Vec<(PlSmallStr, DataTypeExpr)>, RowEncodingVariant),365}366367impl Hash for FunctionExpr {368fn hash<H: Hasher>(&self, state: &mut H) {369std::mem::discriminant(self).hash(state);370use FunctionExpr::*;371match self {372// Namespaces373#[cfg(feature = "dtype-array")]374ArrayExpr(f) => f.hash(state),375BinaryExpr(f) => f.hash(state),376#[cfg(feature = "dtype-categorical")]377Categorical(f) => f.hash(state),378ListExpr(f) => f.hash(state),379#[cfg(feature = "strings")]380StringExpr(f) => f.hash(state),381#[cfg(feature = "dtype-struct")]382StructExpr(f) => f.hash(state),383#[cfg(feature = "temporal")]384TemporalExpr(f) => f.hash(state),385#[cfg(feature = "bitwise")]386Bitwise(f) => f.hash(state),387388// Other expressions389Boolean(f) => f.hash(state),390#[cfg(feature = "business")]391Business(f) => f.hash(state),392Pow(f) => f.hash(state),393#[cfg(feature = "index_of")]394IndexOf => {},395#[cfg(feature = "search_sorted")]396SearchSorted { side, descending } => {397side.hash(state);398descending.hash(state);399},400#[cfg(feature = "random")]401Random { method, .. } => method.hash(state),402#[cfg(feature = "cov")]403Correlation { method, .. } => method.hash(state),404#[cfg(feature = "range")]405Range(f) => f.hash(state),406#[cfg(feature = "trigonometry")]407Trigonometry(f) => f.hash(state),408#[cfg(feature = "diff")]409Diff(null_behavior) => null_behavior.hash(state),410#[cfg(feature = "interpolate")]411Interpolate(f) => f.hash(state),412#[cfg(feature = "interpolate_by")]413InterpolateBy => {},414#[cfg(feature = "ffi_plugin")]415FfiPlugin {416flags: _,417lib,418symbol,419kwargs,420} => {421kwargs.hash(state);422lib.hash(state);423symbol.hash(state);424},425426FoldHorizontal {427callback,428returns_scalar,429return_dtype,430}431| ReduceHorizontal {432callback,433returns_scalar,434return_dtype,435} => {436callback.hash(state);437returns_scalar.hash(state);438return_dtype.hash(state);439},440#[cfg(feature = "dtype-struct")]441CumReduceHorizontal {442callback,443returns_scalar,444return_dtype,445} => {446callback.hash(state);447returns_scalar.hash(state);448return_dtype.hash(state);449},450#[cfg(feature = "dtype-struct")]451CumFoldHorizontal {452callback,453returns_scalar,454return_dtype,455include_init,456} => {457callback.hash(state);458returns_scalar.hash(state);459return_dtype.hash(state);460include_init.hash(state);461},462SumHorizontal { ignore_nulls } | MeanHorizontal { ignore_nulls } => {463ignore_nulls.hash(state)464},465MaxHorizontal | MinHorizontal | DropNans | DropNulls | Reverse | ArgUnique | ArgMin466| ArgMax | Product | Shift | ShiftAndFill | Rechunk => {},467Append { upcast } => upcast.hash(state),468ArgSort {469descending,470nulls_last,471} => {472descending.hash(state);473nulls_last.hash(state);474},475#[cfg(feature = "mode")]476Mode => {},477#[cfg(feature = "abs")]478Abs => {},479Negate => {},480NullCount => {},481#[cfg(feature = "arg_where")]482ArgWhere => {},483#[cfg(feature = "trigonometry")]484Atan2 => {},485#[cfg(feature = "dtype-struct")]486AsStruct => {},487#[cfg(feature = "sign")]488Sign => {},489#[cfg(feature = "row_hash")]490Hash(a, b, c, d) => (a, b, c, d).hash(state),491FillNull => {},492#[cfg(feature = "rolling_window")]493RollingExpr { function, options } => {494function.hash(state);495options.hash(state);496},497#[cfg(feature = "rolling_window_by")]498RollingExprBy {499function_by,500options,501} => {502function_by.hash(state);503options.hash(state);504},505#[cfg(feature = "moment")]506Skew(a) => a.hash(state),507#[cfg(feature = "moment")]508Kurtosis(a, b) => {509a.hash(state);510b.hash(state);511},512Repeat => {},513#[cfg(feature = "rank")]514Rank { options, seed } => {515options.hash(state);516seed.hash(state);517},518#[cfg(feature = "round_series")]519Clip { has_min, has_max } => {520has_min.hash(state);521has_max.hash(state);522},523#[cfg(feature = "top_k")]524TopK { descending } => descending.hash(state),525#[cfg(feature = "cum_agg")]526CumCount { reverse } => reverse.hash(state),527#[cfg(feature = "cum_agg")]528CumSum { reverse } => reverse.hash(state),529#[cfg(feature = "cum_agg")]530CumProd { reverse } => reverse.hash(state),531#[cfg(feature = "cum_agg")]532CumMin { reverse } => reverse.hash(state),533#[cfg(feature = "cum_agg")]534CumMax { reverse } => reverse.hash(state),535#[cfg(feature = "dtype-struct")]536ValueCounts {537sort,538parallel,539name,540normalize,541} => {542sort.hash(state);543parallel.hash(state);544name.hash(state);545normalize.hash(state);546},547#[cfg(feature = "unique_counts")]548UniqueCounts => {},549#[cfg(feature = "approx_unique")]550ApproxNUnique => {},551Coalesce => {},552#[cfg(feature = "pct_change")]553PctChange => {},554#[cfg(feature = "log")]555Entropy { base, normalize } => {556base.to_bits().hash(state);557normalize.hash(state);558},559#[cfg(feature = "log")]560Log => {},561#[cfg(feature = "log")]562Log1p => {},563#[cfg(feature = "log")]564Exp => {},565Unique(a) => a.hash(state),566#[cfg(feature = "round_series")]567Round { decimals, mode } => {568decimals.hash(state);569mode.hash(state);570},571#[cfg(feature = "round_series")]572FunctionExpr::RoundSF { digits } => digits.hash(state),573#[cfg(feature = "round_series")]574FunctionExpr::Floor => {},575#[cfg(feature = "round_series")]576Ceil => {},577UpperBound => {},578LowerBound => {},579ConcatExpr(a) => a.hash(state),580#[cfg(feature = "peaks")]581PeakMin => {},582#[cfg(feature = "peaks")]583PeakMax => {},584#[cfg(feature = "cutqcut")]585Cut {586breaks,587labels,588left_closed,589include_breaks,590} => {591let slice = bytemuck::cast_slice::<_, u64>(breaks);592slice.hash(state);593labels.hash(state);594left_closed.hash(state);595include_breaks.hash(state);596},597#[cfg(feature = "dtype-array")]598Reshape(dims) => dims.hash(state),599#[cfg(feature = "repeat_by")]600RepeatBy => {},601#[cfg(feature = "cutqcut")]602QCut {603probs,604labels,605left_closed,606allow_duplicates,607include_breaks,608} => {609let slice = bytemuck::cast_slice::<_, u64>(probs);610slice.hash(state);611labels.hash(state);612left_closed.hash(state);613allow_duplicates.hash(state);614include_breaks.hash(state);615},616#[cfg(feature = "rle")]617RLE => {},618#[cfg(feature = "rle")]619RLEID => {},620ToPhysical => {},621SetSortedFlag(is_sorted) => is_sorted.hash(state),622#[cfg(feature = "ewma")]623EwmMean { options } => options.hash(state),624#[cfg(feature = "ewma_by")]625EwmMeanBy { half_life } => (half_life).hash(state),626#[cfg(feature = "ewma")]627EwmStd { options } => options.hash(state),628#[cfg(feature = "ewma")]629EwmVar { options } => options.hash(state),630#[cfg(feature = "hist")]631Hist {632bin_count,633include_category,634include_breakpoint,635} => {636bin_count.hash(state);637include_category.hash(state);638include_breakpoint.hash(state);639},640#[cfg(feature = "replace")]641Replace => {},642#[cfg(feature = "replace")]643ReplaceStrict { return_dtype } => return_dtype.hash(state),644FillNullWithStrategy(strategy) => strategy.hash(state),645GatherEvery { n, offset } => (n, offset).hash(state),646#[cfg(feature = "reinterpret")]647Reinterpret(signed) => signed.hash(state),648ExtendConstant => {},649#[cfg(feature = "top_k")]650TopKBy { descending } => descending.hash(state),651652RowEncode(variants) => variants.hash(state),653#[cfg(feature = "dtype-struct")]654RowDecode(fs, variants) => {655fs.hash(state);656variants.hash(state);657},658}659}660}661662impl Display for FunctionExpr {663fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {664use FunctionExpr::*;665let s = match self {666// Namespaces667#[cfg(feature = "dtype-array")]668ArrayExpr(func) => return write!(f, "{func}"),669BinaryExpr(func) => return write!(f, "{func}"),670#[cfg(feature = "dtype-categorical")]671Categorical(func) => return write!(f, "{func}"),672ListExpr(func) => return write!(f, "{func}"),673#[cfg(feature = "strings")]674StringExpr(func) => return write!(f, "{func}"),675#[cfg(feature = "dtype-struct")]676StructExpr(func) => return write!(f, "{func}"),677#[cfg(feature = "temporal")]678TemporalExpr(func) => return write!(f, "{func}"),679#[cfg(feature = "bitwise")]680Bitwise(func) => return write!(f, "bitwise_{func}"),681682// Other expressions683Boolean(func) => return write!(f, "{func}"),684#[cfg(feature = "business")]685Business(func) => return write!(f, "{func}"),686#[cfg(feature = "abs")]687Abs => "abs",688Negate => "negate",689NullCount => "null_count",690Pow(func) => return write!(f, "{func}"),691#[cfg(feature = "row_hash")]692Hash(_, _, _, _) => "hash",693#[cfg(feature = "arg_where")]694ArgWhere => "arg_where",695#[cfg(feature = "index_of")]696IndexOf => "index_of",697#[cfg(feature = "search_sorted")]698SearchSorted { .. } => "search_sorted",699#[cfg(feature = "range")]700Range(func) => return write!(f, "{func}"),701#[cfg(feature = "trigonometry")]702Trigonometry(func) => return write!(f, "{func}"),703#[cfg(feature = "trigonometry")]704Atan2 => return write!(f, "arctan2"),705#[cfg(feature = "sign")]706Sign => "sign",707FillNull => "fill_null",708#[cfg(feature = "rolling_window")]709RollingExpr { function, .. } => return write!(f, "{function}"),710#[cfg(feature = "rolling_window_by")]711RollingExprBy { function_by, .. } => return write!(f, "{function_by}"),712Rechunk => "rechunk",713Append { .. } => "upcast",714ShiftAndFill => "shift_and_fill",715DropNans => "drop_nans",716DropNulls => "drop_nulls",717#[cfg(feature = "mode")]718Mode => "mode",719#[cfg(feature = "moment")]720Skew(_) => "skew",721#[cfg(feature = "moment")]722Kurtosis(..) => "kurtosis",723ArgUnique => "arg_unique",724ArgMin => "arg_min",725ArgMax => "arg_max",726ArgSort { .. } => "arg_sort",727Product => "product",728Repeat => "repeat",729#[cfg(feature = "rank")]730Rank { .. } => "rank",731#[cfg(feature = "round_series")]732Clip { has_min, has_max } => match (has_min, has_max) {733(true, true) => "clip",734(false, true) => "clip_max",735(true, false) => "clip_min",736_ => unreachable!(),737},738#[cfg(feature = "dtype-struct")]739AsStruct => "as_struct",740#[cfg(feature = "top_k")]741TopK { descending } => {742if *descending {743"bottom_k"744} else {745"top_k"746}747},748#[cfg(feature = "top_k")]749TopKBy { .. } => "top_k_by",750Shift => "shift",751#[cfg(feature = "cum_agg")]752CumCount { .. } => "cum_count",753#[cfg(feature = "cum_agg")]754CumSum { .. } => "cum_sum",755#[cfg(feature = "cum_agg")]756CumProd { .. } => "cum_prod",757#[cfg(feature = "cum_agg")]758CumMin { .. } => "cum_min",759#[cfg(feature = "cum_agg")]760CumMax { .. } => "cum_max",761#[cfg(feature = "dtype-struct")]762ValueCounts { .. } => "value_counts",763#[cfg(feature = "unique_counts")]764UniqueCounts => "unique_counts",765Reverse => "reverse",766#[cfg(feature = "approx_unique")]767ApproxNUnique => "approx_n_unique",768Coalesce => "coalesce",769#[cfg(feature = "diff")]770Diff(_) => "diff",771#[cfg(feature = "pct_change")]772PctChange => "pct_change",773#[cfg(feature = "interpolate")]774Interpolate(_) => "interpolate",775#[cfg(feature = "interpolate_by")]776InterpolateBy => "interpolate_by",777#[cfg(feature = "log")]778Entropy { .. } => "entropy",779#[cfg(feature = "log")]780Log => "log",781#[cfg(feature = "log")]782Log1p => "log1p",783#[cfg(feature = "log")]784Exp => "exp",785Unique(stable) => {786if *stable {787"unique_stable"788} else {789"unique"790}791},792#[cfg(feature = "round_series")]793Round { .. } => "round",794#[cfg(feature = "round_series")]795RoundSF { .. } => "round_sig_figs",796#[cfg(feature = "round_series")]797Floor => "floor",798#[cfg(feature = "round_series")]799Ceil => "ceil",800UpperBound => "upper_bound",801LowerBound => "lower_bound",802ConcatExpr(_) => "concat_expr",803#[cfg(feature = "cov")]804Correlation { method, .. } => return Display::fmt(method, f),805#[cfg(feature = "peaks")]806PeakMin => "peak_min",807#[cfg(feature = "peaks")]808PeakMax => "peak_max",809#[cfg(feature = "cutqcut")]810Cut { .. } => "cut",811#[cfg(feature = "cutqcut")]812QCut { .. } => "qcut",813#[cfg(feature = "dtype-array")]814Reshape(_) => "reshape",815#[cfg(feature = "repeat_by")]816RepeatBy => "repeat_by",817#[cfg(feature = "rle")]818RLE => "rle",819#[cfg(feature = "rle")]820RLEID => "rle_id",821ToPhysical => "to_physical",822#[cfg(feature = "random")]823Random { method, .. } => method.into(),824SetSortedFlag(_) => "set_sorted",825#[cfg(feature = "ffi_plugin")]826FfiPlugin { lib, symbol, .. } => return write!(f, "{lib}:{symbol}"),827FoldHorizontal { .. } => "fold",828ReduceHorizontal { .. } => "reduce",829#[cfg(feature = "dtype-struct")]830CumReduceHorizontal { .. } => "cum_reduce",831#[cfg(feature = "dtype-struct")]832CumFoldHorizontal { .. } => "cum_fold",833MaxHorizontal => "max_horizontal",834MinHorizontal => "min_horizontal",835SumHorizontal { .. } => "sum_horizontal",836MeanHorizontal { .. } => "mean_horizontal",837#[cfg(feature = "ewma")]838EwmMean { .. } => "ewm_mean",839#[cfg(feature = "ewma_by")]840EwmMeanBy { .. } => "ewm_mean_by",841#[cfg(feature = "ewma")]842EwmStd { .. } => "ewm_std",843#[cfg(feature = "ewma")]844EwmVar { .. } => "ewm_var",845#[cfg(feature = "hist")]846Hist { .. } => "hist",847#[cfg(feature = "replace")]848Replace => "replace",849#[cfg(feature = "replace")]850ReplaceStrict { .. } => "replace_strict",851FillNullWithStrategy(_) => "fill_null_with_strategy",852GatherEvery { .. } => "gather_every",853#[cfg(feature = "reinterpret")]854Reinterpret(_) => "reinterpret",855ExtendConstant => "extend_constant",856857RowEncode(..) => "row_encode",858#[cfg(feature = "dtype-struct")]859RowDecode(..) => "row_decode",860};861write!(f, "{s}")862}863}864865#[cfg(any(feature = "array_to_struct", feature = "list_to_struct"))]866pub type DslNameGenerator = PlanCallback<usize, String>;867868869