From e54c4fc3182984206d3510072aed71d9f17baf93 Mon Sep 17 00:00:00 2001 From: Yongqiang YANG Date: Tue, 20 Aug 2024 16:43:52 +0800 Subject: [PATCH 1/3] [improvemen](overflow) Provide the user with a suggestion to avoid the error. --- be/src/vec/columns/column_string.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/be/src/vec/columns/column_string.h b/be/src/vec/columns/column_string.h index 182b8cbefdeeb1..ccf05c1464bffb 100644 --- a/be/src/vec/columns/column_string.h +++ b/be/src/vec/columns/column_string.h @@ -63,8 +63,9 @@ class ColumnStr final : public COWHelper> { void static check_chars_length(size_t total_length, size_t element_number) { if (UNLIKELY(total_length > MAX_STRING_SIZE)) { throw Exception(ErrorCode::STRING_OVERFLOW_IN_VEC_ENGINE, - "string column length is too large: total_length={}, element_number={}", - total_length, element_number); + "string column length is too large: total_length={}, element_number={}, " + "you can set batch_size a number smaller than {} to avoid this error", + total_length, element_number, element_number); } } From 41f1c47ebc7575c1ed09bcac62039b4ca37fa33b Mon Sep 17 00:00:00 2001 From: Yongqiang YANG Date: Tue, 20 Aug 2024 23:44:07 +0800 Subject: [PATCH 2/3] fix --- be/src/vec/columns/column_string.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/be/src/vec/columns/column_string.h b/be/src/vec/columns/column_string.h index ccf05c1464bffb..c65e6a1f8a9568 100644 --- a/be/src/vec/columns/column_string.h +++ b/be/src/vec/columns/column_string.h @@ -63,9 +63,9 @@ class ColumnStr final : public COWHelper> { void static check_chars_length(size_t total_length, size_t element_number) { if (UNLIKELY(total_length > MAX_STRING_SIZE)) { throw Exception(ErrorCode::STRING_OVERFLOW_IN_VEC_ENGINE, - "string column length is too large: total_length={}, element_number={}, " - "you can set batch_size a number smaller than {} to avoid this error", - total_length, element_number, element_number); + "string column length is too large: total_length={}, element_number={}, " + "you can set batch_size a number smaller than {} to avoid this error", + total_length, element_number, element_number); } } From 29ad5784ffb5edc50405763b019aebc36cfa925a Mon Sep 17 00:00:00 2001 From: Yongqiang YANG Date: Sat, 24 Aug 2024 18:34:50 +0800 Subject: [PATCH 3/3] format --- be/src/vec/columns/column_string.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/vec/columns/column_string.h b/be/src/vec/columns/column_string.h index c65e6a1f8a9568..b441b81613b184 100644 --- a/be/src/vec/columns/column_string.h +++ b/be/src/vec/columns/column_string.h @@ -62,7 +62,8 @@ class ColumnStr final : public COWHelper> { void static check_chars_length(size_t total_length, size_t element_number) { if (UNLIKELY(total_length > MAX_STRING_SIZE)) { - throw Exception(ErrorCode::STRING_OVERFLOW_IN_VEC_ENGINE, + throw Exception( + ErrorCode::STRING_OVERFLOW_IN_VEC_ENGINE, "string column length is too large: total_length={}, element_number={}, " "you can set batch_size a number smaller than {} to avoid this error", total_length, element_number, element_number);