Skip to content

Commit 26823e3

Browse files
committed
remove tests assuming string->int coercion is impossible
1 parent 2262f99 commit 26823e3

2 files changed

Lines changed: 0 additions & 28 deletions

File tree

datafusion/expr-common/src/type_coercion/binary/tests/arithmetic.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,6 @@
1818
use super::*;
1919
use datafusion_common::assert_contains;
2020

21-
#[test]
22-
fn test_coercion_error() -> Result<()> {
23-
let coercer =
24-
BinaryTypeCoercer::new(&DataType::Float32, &Operator::Plus, &DataType::Utf8);
25-
let result_type = coercer.get_input_types();
26-
27-
let e = result_type.unwrap_err();
28-
assert_eq!(
29-
e.strip_backtrace(),
30-
"Error during planning: Cannot coerce arithmetic expression Float32 + Utf8 to valid types"
31-
);
32-
Ok(())
33-
}
34-
3521
#[test]
3622
fn test_date_timestamp_arithmetic_error() -> Result<()> {
3723
let (lhs, rhs) = BinaryTypeCoercer::new(

datafusion/sql/tests/cases/diagnostic.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -202,20 +202,6 @@ fn test_ambiguous_reference() -> Result<()> {
202202
Ok(())
203203
}
204204

205-
#[test]
206-
fn test_incompatible_types_binary_arithmetic() -> Result<()> {
207-
let query = "SELECT /*whole+left*/id/*left*/ + /*right*/first_name/*right+whole*/ FROM person";
208-
let spans = get_spans(query);
209-
let diag = do_query(query);
210-
assert_snapshot!(diag.message, @"expressions have incompatible types");
211-
assert_eq!(diag.span, Some(spans["whole"]));
212-
assert_snapshot!(diag.notes[0].message, @"has type UInt32");
213-
assert_eq!(diag.notes[0].span, Some(spans["left"]));
214-
assert_snapshot!(diag.notes[1].message, @"has type Utf8");
215-
assert_eq!(diag.notes[1].span, Some(spans["right"]));
216-
Ok(())
217-
}
218-
219205
#[test]
220206
fn test_field_not_found_suggestion() -> Result<()> {
221207
let query = "SELECT /*whole*/first_na/*whole*/ FROM person";

0 commit comments

Comments
 (0)