From 7e86c1beab135addb304acdea4fb870b975d496d Mon Sep 17 00:00:00 2001 From: camby <104178625@qq.com> Date: Mon, 9 May 2022 09:37:27 +0800 Subject: [PATCH] [fix] UT MathFunctionTest.round_test fix (#9447) Function round support two format round(double) and round(double, int), the argument is variadic. But FunctionBinaryArithmetic not support variadic argument now, make get_function for round(double, int) failed. reproduce steps: 1. set enable_vectorized_engine=true; 2. try to call round(double, int); ``` > select round(10.12345,2); ERROR 1105 (HY000): errCode = 2, detailMessage = Function round is not implemented ``` --- .../functions/function_binary_arithmetic.h | 30 ++++++++++++------- .../math_functions/test_round.out | 13 ++++++++ .../math_functions/test_round.groovy | 30 +++++++++++++++++++ 3 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 regression-test/data/query/sql_functions/math_functions/test_round.out create mode 100644 regression-test/suites/query/sql_functions/math_functions/test_round.groovy diff --git a/be/src/vec/functions/function_binary_arithmetic.h b/be/src/vec/functions/function_binary_arithmetic.h index 74b7df4260..ad3ad38bdf 100644 --- a/be/src/vec/functions/function_binary_arithmetic.h +++ b/be/src/vec/functions/function_binary_arithmetic.h @@ -58,19 +58,20 @@ struct ModuloImpl; template