jackwener commented on code in PR #5092:
URL: https://github.com/apache/arrow-datafusion/pull/5092#discussion_r1089890303
##########
datafusion/expr/src/expr_rewriter.rs:
##########
@@ -493,24 +476,18 @@ pub fn replace_col(e: Expr, replace_map:
&HashMap<&Column, &Column>) -> Result<E
/// For example, if there were expressions like `foo.bar` this would
/// rewrite it to just `bar`.
pub fn unnormalize_col(expr: Expr) -> Expr {
- struct RemoveQualifier {}
-
- impl ExprRewriter for RemoveQualifier {
- fn mutate(&mut self, expr: Expr) -> Result<Expr> {
- if let Expr::Column(col) = expr {
- // let Column { relation: _, name } = col;
- Ok(Expr::Column(Column {
- relation: None,
- name: col.name,
- }))
- } else {
- Ok(expr)
- }
+ rewrite_expr(expr, |expr| {
+ if let Expr::Column(col) = expr {
+ // let Column { relation: _, name } = col;
Review Comment:
Can we remove it?
--
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]