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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]