Skip to content

Commit

Permalink
fix(rust): Functions for streaming require streaming feature (#18602)
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi authored Sep 7, 2024
1 parent 5d7f41e commit a0d28fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/polars-lazy/src/frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion crates/polars-python/src/lazyframe/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a0d28fd

Please sign in to comment.