amorynan commented on code in PR #37495:
URL: https://github.com/apache/doris/pull/37495#discussion_r1674967255


##########
be/src/vec/functions/array/function_array_with_constant.cpp:
##########
@@ -91,9 +91,9 @@ class FunctionArrayWithConstant : public IFunction {
         array_sizes.reserve(input_rows_count);
         for (size_t i = 0; i < input_rows_count; ++i) {
             auto array_size = num->get_int(i);
-            if (UNLIKELY(array_size < 0)) {
-                return Status::RuntimeError("Array size can not be negative in 
function:" +
-                                            get_name());
+            if (UNLIKELY(array_size < 0) || UNLIKELY(array_size > 
max_array_size_as_field)) {
+                return Status::RuntimeError("Array size should in range(0, {}) 
in function: {}",

Review Comment:
   array_size has already in error message 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to