From b1e290f9592fd2863bf100a413f1310b5a2a8edf Mon Sep 17 00:00:00 2001 From: dimbtp Date: Mon, 26 Feb 2024 23:50:23 +0800 Subject: [PATCH] fix: range fix in modulo function tests (#3389) fix: range fix for modulo tests --- src/common/function/src/scalars/math/modulo.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/function/src/scalars/math/modulo.rs b/src/common/function/src/scalars/math/modulo.rs index df2d84e66b..d9ea174488 100644 --- a/src/common/function/src/scalars/math/modulo.rs +++ b/src/common/function/src/scalars/math/modulo.rs @@ -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)); } @@ -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)); } @@ -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)); }