This is an automated email from the ASF dual-hosted git repository. yangzhg pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push: new a6f5ec9efb [Bugfix](round) fix round function may coredump (#15235) a6f5ec9efb is described below commit a6f5ec9efb997d1cdd56c050fc15300dd6a3cb70 Author: Zhengguo Yang <yangz...@gmail.com> AuthorDate: Wed Dec 21 15:38:07 2022 +0800 [Bugfix](round) fix round function may coredump (#15235) --- be/src/exprs/scalar_fn_call.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/exprs/scalar_fn_call.cpp b/be/src/exprs/scalar_fn_call.cpp index 7212b619bb..b023df6ff5 100644 --- a/be/src/exprs/scalar_fn_call.cpp +++ b/be/src/exprs/scalar_fn_call.cpp @@ -151,7 +151,8 @@ Status ScalarFnCall::open(RuntimeState* state, ExprContext* ctx, // determines how many decimal places are printed. // TODO: revisit this. We should be able to do this if the scale argument is // non-constant. - if (_fn.name.function_name == "round" && _type.type == TYPE_DOUBLE) { + if (_fn.name.function_name == "round" && _fn.__isset.signature && + _fn.signature.find("round_up_to") != std::string::npos) { DCHECK_EQ(_children.size(), 2); if (_children[1]->is_constant()) { IntVal scale_arg = _children[1]->get_int_val(ctx, nullptr); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org