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
This commit is contained in:
Fernando Herrera 2021-06-27 18:42:37 +01:00 committed by GitHub
parent c2f78aaf88
commit 989062d2f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -669,14 +669,14 @@ fn compare_series_decimal<'r, F>(
span: &Span, span: &Span,
) -> UntaggedValue ) -> UntaggedValue
where where
F: Fn(&'r ChunkedArray<Float64Type>, i64) -> ChunkedArray<BooleanType>, F: Fn(&'r ChunkedArray<Float64Type>, f64) -> ChunkedArray<BooleanType>,
{ {
let casted = series.f64(); let casted = series.f64();
match casted { match casted {
Ok(casted) => { Ok(casted) => {
let res = f( let res = f(
casted, casted,
val.to_i64() val.to_f64()
.expect("Internal error: protocol did not use compatible decimal"), .expect("Internal error: protocol did not use compatible decimal"),
); );
let res = res.into_series(); let res = res.into_series();