Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <[email protected]>
  • Loading branch information
jayzhan211 committed Nov 4, 2024
1 parent 804242c commit 793b0da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datafusion/expr/src/type_coercion/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ fn get_valid_types(
// Aim to keep this logic as SIMPLE as possible!
// Make sure the corresponding test is covered
// If this function becomes COMPLEX, create another new signature!
fn can_cast_to(logical_type: &NativeType, target_type: &NativeType) -> bool {
fn can_coerce_to(logical_type: &NativeType, target_type: &NativeType) -> bool {
if logical_type == target_type {
return true;
}
Expand All @@ -586,7 +586,7 @@ fn get_valid_types(
{
let logical_type: NativeType = current_type.into();
let target_logical_type = target_type.native();
if can_cast_to(&logical_type, target_logical_type) {
if can_coerce_to(&logical_type, target_logical_type) {
let target_type =
target_logical_type.default_cast_for(current_type)?;
new_types.push(target_type);
Expand Down

0 comments on commit 793b0da

Please sign in to comment.