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

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

commit 3efae41885e83cccbab6f7cabc05f604d275dce3
Author: morningman <[email protected]>
AuthorDate: Wed Dec 13 23:22:45 2023 +0800

    Revert "[fix](decimalv2) avoid crashing caused by decimalv2 arithmetic with 
check_overflow_for_decimal enabled (#28219)"
    
    This reverts commit ace2b45c377fb72338babf1415a96850458862b8.
---
 be/src/vec/functions/function_binary_arithmetic.h | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/be/src/vec/functions/function_binary_arithmetic.h 
b/be/src/vec/functions/function_binary_arithmetic.h
index a58417b71e2..ab89c3f8543 100644
--- a/be/src/vec/functions/function_binary_arithmetic.h
+++ b/be/src/vec/functions/function_binary_arithmetic.h
@@ -961,8 +961,6 @@ public:
         }
 
         bool check_overflow_for_decimal = 
context->check_overflow_for_decimal();
-        auto status = Status::RuntimeError("{}'s arguments do not match the 
expected data types",
-                                           get_name());
         bool valid = cast_both_types(
                 left_generic, right_generic, result_generic,
                 [&](const auto& left, const auto& right, const auto& res) {
@@ -980,13 +978,6 @@ public:
                                                         
(IsDataTypeDecimal<LeftDataType> ||
                                                          
IsDataTypeDecimal<RightDataType>))) {
                         if (check_overflow_for_decimal) {
-                            if constexpr ((IsDecimalV2<typename 
LeftDataType::FieldType> ||
-                                           IsDecimalV2<typename RightDataType::
-                                                               
FieldType>)&&!is_to_null_type) {
-                                status = 
Status::Error<ErrorCode::NOT_IMPLEMENTED_ERROR>(
-                                        "cannot check overflow with 
decimalv2");
-                                return false;
-                            }
                             auto column_result = ConstOrVectorAdapter<
                                     LeftDataType, RightDataType,
                                     
std::conditional_t<IsDataTypeDecimal<ExpectedResultDataType>,
@@ -1016,7 +1007,8 @@ public:
                     return false;
                 });
         if (!valid) {
-            return status;
+            return Status::RuntimeError("{}'s arguments do not match the 
expected data types",
+                                        get_name());
         }
 
         return Status::OK();


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

Reply via email to