You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/12 14:11:39 UTC

[GitHub] [incubator-doris] yiguolei commented on a diff in pull request #9531: [improvement](load) reduce useless err_msg format in VOlapTableSink send

yiguolei commented on code in PR #9531:
URL: https://github.com/apache/incubator-doris/pull/9531#discussion_r871431637


##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -506,27 +506,27 @@ Status VOlapTableSink::_validate_data(RuntimeState* state, vectorized::Block* bl
                     if (!filter_bitmap->Get(j)) {
                         auto str_val = column_string->get_data_at(j);
                         bool invalid = str_val.size > limit;
-
                         error_msg.clear();
-                        if (str_val.size > desc->type().len) {
-                            fmt::format_to(error_msg, "{}",
-                                           "the length of input is too long than schema. ");
-                            fmt::format_to(error_msg, "column_name: {}; ", desc->col_name());
-                            fmt::format_to(error_msg, "input str: [{}] ", str_val.to_prefix(10));
-                            fmt::format_to(error_msg, "schema length: {}; ", desc->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, "column_name: {}; ", desc->col_name());
-                            fmt::format_to(error_msg, "input str: [{}] ", str_val.to_prefix(10));
-                            fmt::format_to(error_msg, "schema length: {}; ", desc->type().len);
-                            fmt::format_to(error_msg, "limit length: {}; ", limit);
-                            fmt::format_to(error_msg, "actual length: {}; ", str_val.size);
-                        }
-
                         if (invalid) {

Review Comment:
   The modified logic is not the same with previous one. 
   size_t limit = std::min(config::string_type_length_soft_limit_bytes, desc->type().len); 
   So, if (desc->type().len > string_type_length_soft_limit_bytes), then the result is wrong



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org