yiguolei commented on code in PR #39337:
URL: https://github.com/apache/doris/pull/39337#discussion_r1716389036


##########
be/src/vec/sink/vtablet_block_convertor.cpp:
##########
@@ -222,19 +223,33 @@ Status 
OlapTableBlockConvertor::_validate_column(RuntimeState* state, const Type
             limit = std::min(config::string_type_length_soft_limit_bytes, 
type.len);
         }
 
-        auto* __restrict offsets = column_string->get_offsets().data();
+        const auto* __restrict offsets = column_string->get_offsets().data();
         int invalid_count = 0;
         for (int j = 0; j < row_count; ++j) {
             invalid_count += (offsets[j] - offsets[j - 1]) > limit;
         }
 
+        auto check_column_type = [&]() {
+            const auto& real_column = *real_column_ptr;
+            if (nullptr == dynamic_cast<const 
vectorized::ColumnString*>(&real_column)) {
+                return Status::InternalError(
+                        "invalid column(#{}) type: {}, expect type: 
ColumnString, is nereids: {}",
+                        slot_index, demangle(typeid(real_column).name()), 
state->is_nereids());
+            }
+            return Status::OK();
+        };
+
         if (invalid_count) {
             for (size_t j = 0; j < row_count; ++j) {
                 auto row = rows ? (*rows)[j] : j;
                 if (need_to_validate(j, row)) {
                     auto str_val = column_string->get_data_at(j);
                     bool invalid = str_val.size > limit;
                     if (invalid) {
+                        auto st = check_column_type();
+                        if (!st.ok()) {
+                            return st;

Review Comment:
   这里在log 里输出一下吧
   



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to