xiaokang commented on code in PR #37495:
URL: https://github.com/apache/doris/pull/37495#discussion_r1674046341
##########
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:
add array_size actual value in error message for debug
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]