From 9527b1c2fdd7f5f2521ce1e6464081cf032aeabe Mon Sep 17 00:00:00 2001 From: Rui Mo Date: Thu, 22 Apr 2021 14:49:17 +0800 Subject: [PATCH] fix normalize function (#13) --- cpp/src/gandiva/precompiled/arithmetic_ops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/gandiva/precompiled/arithmetic_ops.cc b/cpp/src/gandiva/precompiled/arithmetic_ops.cc index 988c507db823b..f2aec1bfcba5b 100644 --- a/cpp/src/gandiva/precompiled/arithmetic_ops.cc +++ b/cpp/src/gandiva/precompiled/arithmetic_ops.cc @@ -145,7 +145,7 @@ NUMERIC_DATE_TYPES(BINARY_RELATIONAL_NAN, greater_than_or_equal_to_with_nan, >=) gdv_##OUT_TYPE normalize_##IN_TYPE(gdv_##IN_TYPE in) { \ if (isnan(in)) { \ return 0.0 / 0.0; \ - } else if (in < 0 && std::abs(in) < 0.0000001) { \ + } else if (std::abs(in) < 0.0000001) { \ return 0.0; \ } else { \ return in; \