From 3924ecead512f62f28e2d5f3e2cb42a279ca7d9a Mon Sep 17 00:00:00 2001 From: Yulei-Yang Date: Tue, 1 Nov 2022 22:02:33 +0800 Subject: [PATCH] [minor](load) Improve error message for string type in loading process (#13718) --- be/src/vec/sink/vtablet_sink.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/be/src/vec/sink/vtablet_sink.cpp b/be/src/vec/sink/vtablet_sink.cpp index 2a1bd946b6..47acc5cea0 100644 --- a/be/src/vec/sink/vtablet_sink.cpp +++ b/be/src/vec/sink/vtablet_sink.cpp @@ -633,13 +633,15 @@ Status VOlapTableSink::_validate_column(RuntimeState* state, const TypeDescripto if (str_val.size > type.len) { fmt::format_to(error_msg, "{}", "the length of input is too long than schema. "); - fmt::format_to(error_msg, "input str: [{}] ", str_val.to_prefix(10)); + fmt::format_to(error_msg, "first 32 bytes of input str: [{}] ", + str_val.to_prefix(32)); fmt::format_to(error_msg, "schema length: {}; ", type.len); fmt::format_to(error_msg, "actual length: {}; ", str_val.size); } else if (str_val.size > limit) { fmt::format_to(error_msg, "{}", "the length of input string is too long than vec schema. "); - fmt::format_to(error_msg, "input str: [{}] ", str_val.to_prefix(10)); + fmt::format_to(error_msg, "first 32 bytes of input str: [{}] ", + str_val.to_prefix(32)); fmt::format_to(error_msg, "schema length: {}; ", type.len); fmt::format_to(error_msg, "limit length: {}; ", limit); fmt::format_to(error_msg, "actual length: {}; ", str_val.size);