diff --git a/crates/polars-lazy/Cargo.toml b/crates/polars-lazy/Cargo.toml index 2dfd642cde1f..3d1f67cbaf66 100644 --- a/crates/polars-lazy/Cargo.toml +++ b/crates/polars-lazy/Cargo.toml @@ -203,6 +203,7 @@ dynamic_group_by = [ "temporal", "polars-expr/dynamic_group_by", "polars-mem-engine/dynamic_group_by", + "polars-stream/dynamic_group_by" ] ewma = ["polars-plan/ewma"] ewma_by = ["polars-plan/ewma_by"] diff --git a/crates/polars-stream/Cargo.toml b/crates/polars-stream/Cargo.toml index 4ed5ac3342c9..ddf4e7be4f18 100644 --- a/crates/polars-stream/Cargo.toml +++ b/crates/polars-stream/Cargo.toml @@ -39,3 +39,4 @@ version_check = { workspace = true } nightly = [] bitwise = ["polars-core/bitwise", "polars-plan/bitwise"] merge_sorted = ["polars-plan/merge_sorted"] +dynamic_group_by = [] diff --git a/crates/polars-stream/src/physical_plan/lower_ir.rs b/crates/polars-stream/src/physical_plan/lower_ir.rs index e082ac80afc9..c25083c412b5 100644 --- a/crates/polars-stream/src/physical_plan/lower_ir.rs +++ b/crates/polars-stream/src/physical_plan/lower_ir.rs @@ -329,19 +329,19 @@ pub fn lower_ir( maintain_order, options, } => { - if apply.is_some() { + if apply.is_some() || *maintain_order { + todo!() + } + + #[cfg(feature = "dynamic_group_by")] + if options.dynamic.is_some() || options.rolling.is_some() { todo!() } let key = keys.clone(); let mut aggs = aggs.clone(); - let maintain_order = *maintain_order; let options = options.clone(); - if options.dynamic.is_some() || options.rolling.is_some() || maintain_order { - todo!() - } - polars_ensure!(!keys.is_empty(), ComputeError: "at least one key is required in a group_by operation"); // TODO: allow all aggregates.