Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup type coercion (#3419) #6778

Merged
merged 4 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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),
];
Comment on lines +2143 to 2151
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what this test was supposed to be testing, but a lot of these expression are ill-formed and now return an error

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps @izveigor remembers 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this test, but it really seems redundant.

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