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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to