This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 803cf4dd0bb branch-3.0: [chore](log) Use correct error type of uneven user behaviour (#43493) 803cf4dd0bb is described below commit 803cf4dd0bbb7bb111377ac460c16ca514bec99b Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Sat Nov 9 22:08:16 2024 +0800 branch-3.0: [chore](log) Use correct error type of uneven user behaviour (#43493) Cherry-picked from #43334 Co-authored-by: zclllhhjj <zhaochan...@selectdb.com> --- be/src/vec/columns/column_array.cpp | 5 +++-- be/src/vec/columns/column_map.cpp | 2 +- be/src/vec/functions/array/function_array_with_constant.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/be/src/vec/columns/column_array.cpp b/be/src/vec/columns/column_array.cpp index 8b0c8b1e8c2..05cb2d2addc 100644 --- a/be/src/vec/columns/column_array.cpp +++ b/be/src/vec/columns/column_array.cpp @@ -25,6 +25,7 @@ #include <cstring> #include <vector> +#include "common/status.h" #include "vec/columns/column_const.h" #include "vec/columns/column_nullable.h" #include "vec/columns/column_string.h" @@ -130,7 +131,7 @@ Field ColumnArray::operator[](size_t n) const { if (size > max_array_size_as_field) throw doris::Exception( - ErrorCode::INTERNAL_ERROR, + ErrorCode::INVALID_ARGUMENT, "Array of size {}, is too large to be manipulated as single field, maximum size {}", size, max_array_size_as_field); @@ -147,7 +148,7 @@ void ColumnArray::get(size_t n, Field& res) const { if (size > max_array_size_as_field) throw doris::Exception( - ErrorCode::INTERNAL_ERROR, + ErrorCode::INVALID_ARGUMENT, "Array of size {}, is too large to be manipulated as single field, maximum size {}", size, max_array_size_as_field); diff --git a/be/src/vec/columns/column_map.cpp b/be/src/vec/columns/column_map.cpp index a85737b9e04..c00d1faba41 100644 --- a/be/src/vec/columns/column_map.cpp +++ b/be/src/vec/columns/column_map.cpp @@ -105,7 +105,7 @@ Field ColumnMap::operator[](size_t n) const { size_t element_size = size_at(n); if (element_size > max_array_size_as_field) { - throw doris::Exception(doris::ErrorCode::INTERNAL_ERROR, + throw doris::Exception(doris::ErrorCode::INVALID_ARGUMENT, "element size {} is too large to be manipulated as single map " "field, maximum size {}", element_size, max_array_size_as_field); diff --git a/be/src/vec/functions/array/function_array_with_constant.cpp b/be/src/vec/functions/array/function_array_with_constant.cpp index 16e3947714c..0fd20a436ea 100644 --- a/be/src/vec/functions/array/function_array_with_constant.cpp +++ b/be/src/vec/functions/array/function_array_with_constant.cpp @@ -92,8 +92,8 @@ public: for (size_t i = 0; i < input_rows_count; ++i) { auto array_size = num->get_int(i); if (UNLIKELY(array_size < 0) || UNLIKELY(array_size > max_array_size_as_field)) { - return Status::RuntimeError("Array size should in range(0, {}) in function: {}", - max_array_size_as_field, get_name()); + return Status::InvalidArgument("Array size should in range(0, {}) in function: {}", + max_array_size_as_field, get_name()); } offset += array_size; offsets.push_back(offset); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org