alamb commented on code in PR #12469:
URL: https://github.com/apache/datafusion/pull/12469#discussion_r1760033533


##########
datafusion/sql/src/expr/function.rs:
##########
@@ -77,7 +77,7 @@ fn find_closest_match(candidates: Vec<String>, target: &str) 
-> String {
                 &target,
             )
         })
-        .expect("No candidates provided.") // Panic if `candidates` argument 
is empty
+        .ok_or_else(|| internal_datafusion_err!("No candidates provided."))

Review Comment:
   ```suggestion
           .ok_or_else(|| internal_datafusion_err!("No functions registered 
with this context."))
   ```



-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to