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

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


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

commit 1f707d269595c79a3f74a8e5f67c117a71407562
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Aug 6 11:25:54 2025 +0800

    branch-2.1: [fix](function) Fix functionbuilder check #54255 (#54338)
    
    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 cfc6a39f397..cc1d815f606 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"
@@ -258,9 +259,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