This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 028243defad [fix](function) bad performance caused by creating Status::RuntimeError (#28362) (#28377) 028243defad is described below commit 028243defad4d00562e853776c03db14069a7a2d Author: Jerry Hu <mrh...@gmail.com> AuthorDate: Thu Dec 14 13:45:06 2023 +0800 [fix](function) bad performance caused by creating Status::RuntimeError (#28362) (#28377) --- be/src/vec/functions/function_binary_arithmetic.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/be/src/vec/functions/function_binary_arithmetic.h b/be/src/vec/functions/function_binary_arithmetic.h index 81097d37d19..59a9701c906 100644 --- a/be/src/vec/functions/function_binary_arithmetic.h +++ b/be/src/vec/functions/function_binary_arithmetic.h @@ -954,8 +954,7 @@ 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()); + Status status; bool valid = cast_both_types( left_generic, right_generic, result_generic, [&](const auto& left, const auto& right, const auto& res) { @@ -1009,6 +1008,10 @@ public: return false; }); if (!valid) { + if (status.ok()) { + return Status::RuntimeError("{}'s arguments do not match the expected data types", + get_name()); + } return status; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org