Skip to content

Commit

Permalink
also expand rename in filters (#3008)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Mar 30, 2022
1 parent 82c71db commit 5387319
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion polars/polars-lazy/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ impl LogicalPlanBuilder {

/// Apply a filter
pub fn filter(self, predicate: Expr) -> Self {
let predicate = if has_expr(&predicate, |e| matches!(e, Expr::Wildcard)) {
let predicate = if has_expr(&predicate, |e| {
matches!(e, Expr::Wildcard | Expr::RenameAlias { .. })
}) {
let rewritten = rewrite_projections(vec![predicate], self.0.schema(), &[]);
combine_predicates_expr(rewritten.into_iter())
} else {
Expand Down

0 comments on commit 5387319

Please sign in to comment.