Skip to content

Commit

Permalink
fix: range fix in modulo function tests (#3389)
Browse files Browse the repository at this point in the history
fix: range fix for modulo tests
  • Loading branch information
dimbtp authored Feb 26, 2024
1 parent d8dc93f commit b1e290f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/function/src/scalars/math/modulo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ mod tests {
];
let result = function.eval(FunctionContext::default(), &args).unwrap();
assert_eq!(result.len(), 4);
for i in 0..3 {
for i in 0..4 {
let p: i64 = (nums[i] % divs[i]) as i64;
assert!(matches!(result.get(i), Value::Int64(v) if v == p));
}
Expand Down Expand Up @@ -160,7 +160,7 @@ mod tests {
];
let result = function.eval(FunctionContext::default(), &args).unwrap();
assert_eq!(result.len(), 4);
for i in 0..3 {
for i in 0..4 {
let p: u64 = (nums[i] % divs[i]) as u64;
assert!(matches!(result.get(i), Value::UInt64(v) if v == p));
}
Expand Down Expand Up @@ -192,7 +192,7 @@ mod tests {
];
let result = function.eval(FunctionContext::default(), &args).unwrap();
assert_eq!(result.len(), 4);
for i in 0..3 {
for i in 0..4 {
let p: f64 = nums[i] % divs[i];
assert!(matches!(result.get(i), Value::Float64(v) if v == p));
}
Expand Down

0 comments on commit b1e290f

Please sign in to comment.