Skip to content

Commit

Permalink
fix: Ensure empty with_columns is a no-op (pola-rs#15694)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Apr 16, 2024
1 parent b96ca9f commit 8befcd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/polars-plan/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,9 @@ impl LogicalPlanBuilder {
}

pub fn with_columns(self, exprs: Vec<Expr>, options: ProjectionOptions) -> Self {
if exprs.is_empty() {
return self;
}
// current schema
let schema = try_delayed!(self.0.schema(), &self.0, into);
let mut new_schema = (**schema).clone();
Expand Down

0 comments on commit 8befcd1

Please sign in to comment.