You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/01/30 14:17:57 UTC

[doris] branch master updated: [Bug](function) positive function coredump in decimal (#16230)

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

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1020fe165b [Bug](function) positive function coredump in decimal (#16230)
1020fe165b is described below

commit 1020fe165bf26758052108513e79db071ec4b347
Author: HappenLee <ha...@hotmail.com>
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org