onlyjackfrost commented on code in PR #14849:
URL: https://github.com/apache/datafusion/pull/14849#discussion_r1970114787


##########
datafusion/sql/src/expr/function.rs:
##########
@@ -351,12 +349,21 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
                 )));
             }
         }
-
         // Could not find the relevant function, so return an error
         if let Some(suggested_func_name) =
             suggest_valid_function(&name, is_function_window, 
self.context_provider)
         {
             plan_err!("Invalid function '{name}'.\nDid you mean 
'{suggested_func_name}'?")
+                .map_err(|e| {
+                    let span = Span::try_from_sqlparser_span(sql_parser_span);
+                    let mut diagnostic =
+                        Diagnostic::new_error(format!("Invalid function 
'{name}'"), span);
+                    diagnostic.add_note(
+                        format!("possible function {}", suggested_func_name),

Review Comment:
   sure



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