This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit f1ae54992e3054c04d68d0193e45f05a8256a231
Author: HappenLee <[email protected]>
AuthorDate: Mon Jan 30 22:17:50 2023 +0800

    [Bug](function) positive function coredump in decimal (#16230)
---
 be/src/vec/functions/function_unary_arithmetic.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/be/src/vec/functions/function_unary_arithmetic.h 
b/be/src/vec/functions/function_unary_arithmetic.h
index c92ceb54d1..8113f42179 100644
--- a/be/src/vec/functions/function_unary_arithmetic.h
+++ b/be/src/vec/functions/function_unary_arithmetic.h
@@ -54,14 +54,17 @@ template <typename>
 struct AbsImpl;
 template <typename>
 struct NegativeImpl;
+template <typename>
+struct PositiveImpl;
 
 /// Used to indicate undefined operation
 struct InvalidType;
 
 template <template <typename> class Op, typename Name, bool is_injective>
 class FunctionUnaryArithmetic : public IFunction {
-    static constexpr bool allow_decimal =
-            std::is_same_v<Op<Int8>, NegativeImpl<Int8>> || 
std::is_same_v<Op<Int8>, AbsImpl<Int8>>;
+    static constexpr bool allow_decimal = std::is_same_v<Op<Int8>, 
NegativeImpl<Int8>> ||
+                                          std::is_same_v<Op<Int8>, 
AbsImpl<Int8>> ||
+                                          std::is_same_v<Op<Int8>, 
PositiveImpl<Int8>>;
 
     template <typename F>
     static bool cast_type(const IDataType* type, F&& f) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to