Skip to content

Commit

Permalink
Cleanup type coercion (apache#3419)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Jun 27, 2023
1 parent 9dd3c2b commit 61f004f
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 373 deletions.
19 changes: 9 additions & 10 deletions datafusion/core/src/physical_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@ mod tests {
use fmt::Debug;
use std::collections::HashMap;
use std::convert::TryFrom;
use std::ops::Not;
use std::ops::{BitAnd, Not};
use std::{any::Any, fmt};

fn make_session_state() -> SessionState {
Expand Down Expand Up @@ -2140,18 +2140,17 @@ mod tests {
async fn errors() -> Result<()> {
let bool_expr = col("c1").eq(col("c1"));
let cases = vec![
// utf8 AND utf8
col("c1").and(col("c1")),
// utf8 = utf8
col("c1").eq(col("c1")),
// u8 AND u8
col("c3").and(col("c3")),
// utf8 = bool
col("c1").eq(bool_expr.clone()),
// u32 AND bool
col("c2").and(bool_expr),
col("c3").bitand(col("c3")),
// utf8 = u8
col("c1").eq(col("c3")),
// bool AND bool
bool_expr.clone().and(bool_expr),
];
for case in cases {
let logical_plan = test_csv_scan().await?.project(vec![case.clone()]);
assert!(logical_plan.is_ok());
test_csv_scan().await?.project(vec![case.clone()]).unwrap();
}
Ok(())
}
Expand Down
Loading

0 comments on commit 61f004f

Please sign in to comment.