This is an automated email from the ASF dual-hosted git repository.

gabriellee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3924ecead5 [minor](load) Improve error message for string type in 
loading process (#13718)
3924ecead5 is described below

commit 3924ecead512f62f28e2d5f3e2cb42a279ca7d9a
Author: Yulei-Yang <[email protected]>
AuthorDate: Tue Nov 1 22:02:33 2022 +0800

    [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);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to