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

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new c690795e343 branch-3.1: [fix](function) Fix functionbuilder check 
#54255 (#54339)
c690795e343 is described below

commit c690795e343cea394341da554e9e9d06b32470b9
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Aug 5 20:18:36 2025 +0800

    branch-3.1: [fix](function) Fix functionbuilder check #54255 (#54339)
    
    Cherry-picked from #54255
    
    Co-authored-by: dwdwqfwe <[email protected]>
---
 be/src/vec/functions/function.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/functions/function.cpp 
b/be/src/vec/functions/function.cpp
index 1fea4c70fc1..cb5f1708f75 100644
--- a/be/src/vec/functions/function.cpp
+++ b/be/src/vec/functions/function.cpp
@@ -25,6 +25,7 @@
 #include <numeric>
 #include <vector>
 
+#include "common/status.h"
 #include "vec/aggregate_functions/aggregate_function.h"
 #include "vec/columns/column.h"
 #include "vec/columns/column_const.h"
@@ -259,9 +260,15 @@ void FunctionBuilderImpl::check_number_of_arguments(size_t 
number_of_arguments)
 
     size_t expected_number_of_arguments = get_number_of_arguments();
 
-    CHECK_EQ(number_of_arguments, expected_number_of_arguments) << fmt::format(
+    DCHECK_EQ(number_of_arguments, expected_number_of_arguments) << 
fmt::format(
             "Number of arguments for function {} doesn't match: passed {} , 
should be {}",
             get_name(), number_of_arguments, expected_number_of_arguments);
+    if (number_of_arguments != expected_number_of_arguments) {
+        throw Exception(
+                ErrorCode::INVALID_ARGUMENT,
+                "Number of arguments for function {} doesn't match: passed {} 
, should be {}",
+                get_name(), number_of_arguments, expected_number_of_arguments);
+    }
 }
 
 DataTypePtr FunctionBuilderImpl::get_return_type_without_low_cardinality(


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

Reply via email to