From 79633bcfeccaad5ea3b615048ecab5048c001b59 Mon Sep 17 00:00:00 2001 From: Andy Grove Date: Tue, 23 Apr 2024 07:46:36 -0600 Subject: [PATCH] update rust tests --- core/src/execution/datafusion/expressions/cast.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/execution/datafusion/expressions/cast.rs b/core/src/execution/datafusion/expressions/cast.rs index afe87bdad..e11333260 100644 --- a/core/src/execution/datafusion/expressions/cast.rs +++ b/core/src/execution/datafusion/expressions/cast.rs @@ -617,8 +617,8 @@ mod test { cast_string_to_i8(".", EvalMode::Legacy).unwrap(), Some(0_i8) ); - // note that TRY behavior is different to LEGACY in some cases - assert_eq!(cast_string_to_i8("0.2", EvalMode::Try).unwrap(), Some(0_i8)); + // TRY should always return null for decimals + assert_eq!(cast_string_to_i8("0.2", EvalMode::Try).unwrap(), None); assert_eq!(cast_string_to_i8(".", EvalMode::Try).unwrap(), None); // ANSI mode should throw error on decimal assert!(cast_string_to_i8("0.2", EvalMode::Ansi).is_err());