Skip to content

Commit

Permalink
update rust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Apr 23, 2024
1 parent 5628a3e commit 79633bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/execution/datafusion/expressions/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 79633bc

Please sign in to comment.