From 793b0dae255e98b2ec2e2fd8f40f71cabf2885e0 Mon Sep 17 00:00:00 2001 From: jayzhan211 Date: Mon, 4 Nov 2024 22:40:58 +0800 Subject: [PATCH] rename Signed-off-by: jayzhan211 --- datafusion/expr/src/type_coercion/functions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datafusion/expr/src/type_coercion/functions.rs b/datafusion/expr/src/type_coercion/functions.rs index 8c32bc5c1598..75dd16c39ed5 100644 --- a/datafusion/expr/src/type_coercion/functions.rs +++ b/datafusion/expr/src/type_coercion/functions.rs @@ -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; } @@ -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);