alamb commented on code in PR #12469: URL: https://github.com/apache/datafusion/pull/12469#discussion_r1763633138
########## datafusion/sql/src/expr/function.rs: ########## @@ -66,8 +66,8 @@ pub fn suggest_valid_function( } /// Find the closest matching string to the target string in the candidates list, using edit distance(case insensitive) -/// Input `candidates` must not be empty otherwise it will panic -fn find_closest_match(candidates: Vec<String>, target: &str) -> String { +/// Input `candidates` must not be empty otherwise an error is returned. +fn find_closest_match(candidates: Vec<String>, target: &str) -> Result<String> { Review Comment: In https://github.com/apache/datafusion/pull/12512 -- 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