Skip to content

Commit 3310087

Browse files
committed
fix clippy error
1 parent 861764d commit 3310087

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

datafusion/sql/src/expr/unary_op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
4949
let spans = operand.spans();
5050
let span = if let Some(s) = spans.as_ref() { s.first() } else { None };
5151
let diagnostic =
52-
Diagnostic::new_error(format!("Unary operator '+' only supports numeric, interval and timestamp types"), span);
52+
Diagnostic::new_error("Unary operator '+' only supports numeric, interval and timestamp types".to_string(), span);
5353
e.with_diagnostic(diagnostic)
5454
})
5555
}

datafusion/sql/tests/cases/diagnostic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ fn test_invalid_function() -> Result<()> {
291291
fn test_unary_op_plus_with_non_column() -> Result<()> {
292292
// create a table with a column of type varchar
293293
let query = "SELECT /*whole*/+'a'/*whole*/ ";
294-
let spans = get_spans(query);
295294
let diag = do_query(query);
296295
assert_eq!(
297296
diag.message,

0 commit comments

Comments
 (0)