diff --git a/crates/polars-lazy/src/frame/mod.rs b/crates/polars-lazy/src/frame/mod.rs index 5aeabaa96cae..b2cfd7267025 100644 --- a/crates/polars-lazy/src/frame/mod.rs +++ b/crates/polars-lazy/src/frame/mod.rs @@ -184,11 +184,13 @@ impl LazyFrame { } /// Run nodes that are capably of doing so on the streaming engine. + #[cfg(feature = "streaming")] pub fn with_streaming(mut self, toggle: bool) -> Self { self.opt_state.set(OptFlags::STREAMING, toggle); self } + #[cfg(feature = "new_streaming")] pub fn with_new_streaming(mut self, toggle: bool) -> Self { self.opt_state.set(OptFlags::NEW_STREAMING, toggle); self diff --git a/crates/polars-python/src/lazyframe/general.rs b/crates/polars-python/src/lazyframe/general.rs index 60e020a7b852..4cfd25258b61 100644 --- a/crates/polars-python/src/lazyframe/general.rs +++ b/crates/polars-python/src/lazyframe/general.rs @@ -488,10 +488,14 @@ impl PyLazyFrame { .with_simplify_expr(simplify_expression) .with_slice_pushdown(slice_pushdown) .with_cluster_with_columns(cluster_with_columns) - .with_streaming(streaming) ._with_eager(_eager) .with_projection_pushdown(projection_pushdown); + #[cfg(feature = "streaming")] + { + ldf = ldf.with_streaming(streaming); + } + #[cfg(feature = "new_streaming")] { ldf = ldf.with_new_streaming(new_streaming);