Skip to content

Commit

Permalink
Add test for StringSubstringLength when indexing by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
aidan-bailey committed Jun 11, 2024
1 parent 9a761fc commit 7af2729
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nemo-physical/src/function/definitions/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,5 +489,10 @@ mod test {
let actual_result6 = StringSubstringLength.evaluate(string.clone(), start6, length6);
assert!(actual_result6.is_some());
assert_eq!(result6, actual_result6.unwrap());

let start7 = AnyDataValue::new_integer_from_u64(0);
let length7 = AnyDataValue::new_integer_from_u64(4);
let actual_result7 = StringSubstringLength.evaluate(string.clone(), start7, length7);
assert!(actual_result7.is_none());
}
}

0 comments on commit 7af2729

Please sign in to comment.