onlyjackfrost commented on code in PR #15209: URL: https://github.com/apache/datafusion/pull/15209#discussion_r1995299494
########## datafusion/sql/src/expr/unary_op.rs: ########## @@ -45,7 +45,13 @@ impl<S: ContextProvider> SqlToRel<'_, S> { { Ok(operand) } else { - plan_err!("Unary operator '+' only supports numeric, interval and timestamp types") + plan_err!("Unary operator '+' only supports numeric, interval and timestamp types").map_err(|e| { + let spans = operand.spans(); + let span = if let Some(s) = spans.as_ref() { s.first() } else { None }; + let diagnostic = + Diagnostic::new_error("Unary operator '+' only supports numeric, interval and timestamp types".to_string(), span); Review Comment: Sure, it will be better this way. -- 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