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 2022/05/06 17:17:02 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2464: MINOR: Partial fix for SQL aggregate queries with aliases

alamb commented on code in PR #2464:
URL: https://github.com/apache/arrow-datafusion/pull/2464#discussion_r867025019


##########
datafusion/expr/src/expr.rs:
##########
@@ -251,6 +251,77 @@ pub enum Expr {
     QualifiedWildcard { qualifier: String },
 }
 
+/// Recursively find all columns referenced by an expression
+pub fn find_columns_referenced_by_expr(e: &Expr) -> Vec<Column> {

Review Comment:
   I think this code could use an ExprVisitor to avoid having to do the recursion itself (and potentially missing some case)
   
   I took a crack at doing so https://github.com/apache/arrow-datafusion/pull/2471



-- 
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