Skip to content

Commit

Permalink
fix: Lazyframe::from(lp) #3877 (#4012)
Browse files Browse the repository at this point in the history
  • Loading branch information
universalmind303 committed Jul 13, 2022
1 parent 4ee4f7c commit d945663
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions polars/polars-lazy/src/frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ pub trait IntoLazy {
impl IntoLazy for DataFrame {
/// Convert the `DataFrame` into a lazy `DataFrame`
fn lazy(self) -> LazyFrame {
LogicalPlanBuilder::from_existing_df(self).build().into()
let lp = LogicalPlanBuilder::from_existing_df(self).build();
LazyFrame {
logical_plan: lp,
opt_state: Default::default(),
}
}
}

Expand All @@ -103,7 +107,10 @@ impl From<LogicalPlan> for LazyFrame {
fn from(plan: LogicalPlan) -> Self {
Self {
logical_plan: plan,
opt_state: Default::default(),
opt_state: OptState {
file_caching: true,
..Default::default()
},
}
}
}
Expand Down

0 comments on commit d945663

Please sign in to comment.