findepi commented on code in PR #13217:
URL: https://github.com/apache/datafusion/pull/13217#discussion_r1826290880


##########
datafusion/expr/src/expr.rs:
##########
@@ -1554,13 +1554,13 @@ impl Expr {
     /// Returns true if there are any column references in this Expr
     pub fn any_column_refs(&self) -> bool {
         self.exists(|expr| Ok(matches!(expr, Expr::Column(_))))
-            .unwrap()
+            .expect("exists closure is infallible")

Review Comment:
   It's fine, but would it be possible to make `.exists` not return `Result` at 
all when closure doesn't return it?
   
   would doing `Try` same way as `iter.try_fold` does work here too?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to