chore: upgrade toolchain to nightly-2024-08-07 (#4549)

* chore: upgrade toolchain to `nightly-2024-08-07`

* chore(ci): upgrade toolchain

* fix: fix unit test
This commit is contained in:
Weny Xu
2024-08-22 19:02:18 +08:00
committed by GitHub
parent 3517c13192
commit 25cd61b310
44 changed files with 90 additions and 108 deletions

View File

@@ -32,7 +32,7 @@ pub struct FunctionContext {
impl FunctionContext {
/// Create a mock [`FunctionContext`] for test.
#[cfg(any(test, feature = "testing"))]
#[cfg(test)]
pub fn mock() -> Self {
Self {
query_ctx: QueryContextBuilder::default().build().into(),

View File

@@ -75,7 +75,7 @@ where
// to keep the not_greater length == floor+1
// so to ensure the peek of the not_greater is array[floor]
// and the peek of the greater is array[floor+1]
let p = if let Some(p) = self.p { p } else { 0.0_f64 };
let p = self.p.unwrap_or(0.0_f64);
let floor = (((self.n - 1) as f64) * p / (100_f64)).floor();
if value <= *self.not_greater.peek().unwrap() {
self.not_greater.push(value);

View File

@@ -245,7 +245,7 @@ mod test {
];
scipy_stats_norm_pdf.update_batch(&v).unwrap();
assert_eq!(
Value::from(0.17843340219081558),
Value::from(0.17843340219081552),
scipy_stats_norm_pdf.evaluate().unwrap()
);

View File

@@ -28,7 +28,7 @@ pub struct FunctionState {
impl FunctionState {
/// Create a mock [`FunctionState`] for test.
#[cfg(any(test, feature = "testing"))]
#[cfg(test)]
pub fn mock() -> Self {
use std::sync::Arc;