datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Consolidate `Filter::remove_aliases` into `Expr::unalias_nested`

Open alamb opened this issue 1 year ago • 1 comments

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?

  1. Remove Filter::remove_aliases and fold its implementation into Expr::unalias_nested

Are these changes tested?

They are covered by existing tests / CI

Are there any user-facing changes?

alamb avatar Jun 19 '24 14:06 alamb

@comphead I wonder if you have time to re-review this PR?

alamb avatar Jun 30 '24 12:06 alamb

Thanks again @peter-toth and @comphead

alamb avatar Jul 02 '24 10:07 alamb