You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/06 19:38:22 UTC

[GitHub] [arrow-datafusion] Dandandan commented on a change in pull request #689: Remove qualifiers on pushed down predicates / Fix parquet pruning

Dandandan commented on a change in pull request #689:
URL: https://github.com/apache/arrow-datafusion/pull/689#discussion_r664828470



##########
File path: datafusion/src/logical_plan/expr.rs
##########
@@ -1150,6 +1150,38 @@ pub fn normalize_cols(
         .collect()
 }
 
+/// Recursively 'unnormalize' (remove all qualifiers) from an
+/// expression tree.
+///
+/// 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;

Review comment:
       ```suggestion
   ```




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org