andygrove commented on code in PR #11307:
URL: https://github.com/apache/datafusion/pull/11307#discussion_r1668897084
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -2130,16 +2130,10 @@ impl Filter {
}
}
- // filter predicates should not be aliased
- if let Expr::Alias(Alias { expr, name, .. }) = predicate {
- return plan_err!(
- "Attempted to create Filter predicate with \
- expression `{expr}` aliased as '{name}'. Filter predicates
should not be \
- aliased."
- );
- }
-
- Ok(Self { predicate, input })
+ Ok(Self {
+ predicate: predicate.unalias_nested().data,
Review Comment:
Unaliasing rather than throwing an exception here makes sense to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]