Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Apr 15, 2024
1 parent 4a3a6fd commit 819b88c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions datafusion/expr/src/type_coercion/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ use arrow::{
use datafusion_common::utils::{coerced_fixed_size_list_to_list, list_ndims};
use datafusion_common::{internal_datafusion_err, internal_err, plan_err, Result};

use super::binary::{
comparison_binary_numeric_coercion, comparison_coercion,
};
use super::binary::{comparison_binary_numeric_coercion, comparison_coercion};

/// Performs type coercion for function arguments.
///
Expand Down Expand Up @@ -455,14 +453,15 @@ fn coerced_from<'a>(
// Note that not all rules in `comparison_coercion` can be reused here.
// For example, all numeric types can be coerced into Utf8 for comparison,
// but not for function arguments.
_ => comparison_binary_numeric_coercion(type_into, type_from)
.and_then(|coerced_type| {
_ => comparison_binary_numeric_coercion(type_into, type_from).and_then(
|coerced_type| {
if *type_into == coerced_type {
Some(coerced_type)
} else {
None
}
}),
},
),
}
}

Expand Down

0 comments on commit 819b88c

Please sign in to comment.