From e17bb2e44554d1f5aa057d07206c19076286eca8 Mon Sep 17 00:00:00 2001 From: Dadepo Aderemi Date: Sun, 17 Dec 2023 10:46:04 +0400 Subject: [PATCH] debug --- .github/workflows/rust.yml | 2 +- src/postgres/math_udfs.rs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 981a88d..0b075d4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -113,4 +113,4 @@ jobs: - name: Build run: cargo build --verbose - name: Run tests - run: cargo test --all-features --verbose -- --nocapture + run: cargo test --all-features --verbose diff --git a/src/postgres/math_udfs.rs b/src/postgres/math_udfs.rs index ef9e529..97bf072 100644 --- a/src/postgres/math_udfs.rs +++ b/src/postgres/math_udfs.rs @@ -19,11 +19,13 @@ pub fn acosd(args: &[ArrayRef]) -> Result { } let result = value.acos().to_degrees(); if result.fract() < 0.9 { - float64array_builder.append_value(result); + if result.fract() < 0.01 { + float64array_builder.append_value(result.floor()); + } else { + float64array_builder.append_value(result); + } } else { - dbg!(&result); - dbg!(&result.round()); - float64array_builder.append_value(result.round()); + float64array_builder.append_value(result.ceil()); } Ok::<(), DataFusionError>(()) } else {