datafusion
datafusion copied to clipboard
Consolidate `Filter::remove_aliases` into `Expr::unalias_nested`
Which issue does this PR close?
Follow on to https://github.com/apache/datafusion/pull/10835
Rationale for this change
As part of https://github.com/apache/datafusion/pull/10835, @peter-toth noted that the nested unaliasing code in FilterExec probably belonged in Exrp to make it more discovrable: https://github.com/apache/datafusion/pull/10835/files#r1644664005
I wonder if it make sense to move this method into Expr?
It turns out when I looked into doing so, there was already an existing implementation that could be used
What changes are included in this PR?
- Remove
Filter::remove_aliasesand fold its implementation intoExpr::unalias_nested
Are these changes tested?
They are covered by existing tests / CI
Are there any user-facing changes?
@comphead I wonder if you have time to re-review this PR?
Thanks again @peter-toth and @comphead