From 989062d2f865b806818b685b36194fba73343f3f Mon Sep 17 00:00:00 2001 From: Fernando Herrera Date: Sun, 27 Jun 2021 18:42:37 +0100 Subject: [PATCH] Removed bug occurring with f64 (#3697) * Type in command description * filter name change * Clean column name * Clippy error and updated polars version * Lint correction in file * CSV Infer schema optional * Correct float operations --- crates/nu-data/src/dataframe.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-data/src/dataframe.rs b/crates/nu-data/src/dataframe.rs index e778c83fb5..c880203acb 100644 --- a/crates/nu-data/src/dataframe.rs +++ b/crates/nu-data/src/dataframe.rs @@ -669,14 +669,14 @@ fn compare_series_decimal<'r, F>( span: &Span, ) -> UntaggedValue where - F: Fn(&'r ChunkedArray, i64) -> ChunkedArray, + F: Fn(&'r ChunkedArray, f64) -> ChunkedArray, { let casted = series.f64(); match casted { Ok(casted) => { let res = f( casted, - val.to_i64() + val.to_f64() .expect("Internal error: protocol did not use compatible decimal"), ); let res = res.into_series();