eliaperantoni commented on issue #14433: URL: https://github.com/apache/datafusion/issues/14433#issuecomment-2728625287
@onlyjackfrost > Not: I didn't see any error that could attach a diagnostic with. I get this in `datafusion-cli`  Which is not very helpful. It seems like datafusion requires _exactly_ a boolean expression with the `Not` operator and doesn't do any coercion. Could you make sure that Datafusion quits with an error decorated with a nice `Diagnostic` with such a query? That would be awesome. You don't necessarily have to build and attach the `Diagnostic` in the same spot where the `Cannot infer common argument type for comparison operation Utf8 IS DISTINCT FROM Boolean` error in my screenshot is raised. You could also add a check somewhere before that code is run, if that makes it easier and more readable, since the query is going to fail anyway. > I would like to attach diagnostic with the Datafusion ParserError "Cannot parse {signed_number} as f64" If possible, I think the `Diagnostic` for `Minus` should be as similar as possible to that of `Plus`. i.e. `- cannot be used with {data_type}` > I think we don't have to attach diagnostic to not_impl_err right? There are many not_impl_err in the sql_interval_to_expr function. Yeah I think you can ignore those :) > IMO, we only have to handle the Datafusion ParserError "Cannot parse {signed_number} as f64" for Minus unary expression and add test case for that. I'm not sure how that error is produced. What query are you using? I get this:  I think that's the one we should probably add a `Diagnostic` too, which would be very similar to the `+`. --- Thank you so much for your contribution :) ❤ -- 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