jsai28 commented on issue #15276:
URL: https://github.com/apache/datafusion/issues/15276#issuecomment-2765086427

   @eliaperantoni I had a follow up question to this regarding the `diagnose` 
trait function. We want to call the diagnose function during logical planning 
and pass in `ReturnTypeArgs` and `FnCallSpans` so that the implementor can 
create a `Diagnostic`. In #14430, the `Diagnostic` is attached to an existing 
error (via the `with_diagnostic` method) and is then bubbled up. Should the 
`diagnose` trait function act similarly here? For example, would the `diagnose` 
function be called 
[here](https://github.com/apache/datafusion/blob/19a1e58071cd60e74faabab805d97fd269418925/datafusion/expr/src/expr_schema.rs#L435)
 for a Scalar UDF? And inside the `diagnose` function is where a Scalar UDF 
implementation would add notes to enrich the error message? Since we're passing 
in `ReturnTypeArgs` and `FnCallSpans` we can use `ReturnTypeArgs` to determine 
the erroneous argument and `FnCallSpans` to highlight where it is located. Is 
that right?


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