Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xinlifoobar committed Jul 18, 2024
1 parent 6a71f91 commit 5809d74
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions datafusion/optimizer/src/analyzer/type_coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,9 @@ fn analyze_internal(
predicate, input, ..
}) = &plan
{
if let Some(boolean_type) =
comparison_coercion(&DataType::Boolean, &predicate.get_type(&schema)?)
{
if let Ok(predicate) = predicate.clone().cast_to(&boolean_type, &schema) {
plan =
LogicalPlan::Filter(Filter::try_new(predicate, Arc::clone(input))?);
}
};
if let Ok(predicate) = predicate.clone().cast_to(&DataType::Boolean, &schema) {
plan = LogicalPlan::Filter(Filter::try_new(predicate, Arc::clone(input))?);
}
}

let mut expr_rewrite = TypeCoercionRewriter::new(&schema);
Expand Down

0 comments on commit 5809d74

Please sign in to comment.