You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/08/23 13:54:07 UTC

[doris] branch master updated: [fix](array-type) fix be occasional coredump when use stream load (#11997)

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

yiguolei 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 cbbf4e10ff [fix](array-type) fix be occasional coredump when use stream load (#11997)
cbbf4e10ff is described below

commit cbbf4e10ff50c689caa0520adba1515a06782f6b
Author: carlvinhust2012 <hu...@126.com>
AuthorDate: Tue Aug 23 21:54:00 2022 +0800

    [fix](array-type) fix be occasional coredump when use stream load (#11997)
    
    Co-authored-by: hucheng01 <hu...@baidu.com>
---
 be/src/runtime/collection_value.cpp | 1 +
 be/src/runtime/row_batch.cpp        | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/be/src/runtime/collection_value.cpp b/be/src/runtime/collection_value.cpp
index fb9de9635c..345fc5c329 100644
--- a/be/src/runtime/collection_value.cpp
+++ b/be/src/runtime/collection_value.cpp
@@ -184,6 +184,7 @@ struct ArrayIteratorFunctionsForString : public GenericArrayIteratorFunctions<ty
         string->ptr = (convert_ptrs ? convert_to<char*>(offset) : copied_string);
     }
     static void deserialize(void* item, const char* tuple_data, const TypeDescriptor& type_desc) {
+        DCHECK((item != nullptr) && (tuple_data != nullptr)) << "item or tuple_data is nullptr";
         auto* string_value = static_cast<CppType*>(item);
         if (string_value->len) {
             int64_t offset = convert_to<int64_t>(string_value->ptr);
diff --git a/be/src/runtime/row_batch.cpp b/be/src/runtime/row_batch.cpp
index 9c8ac6d3aa..79cfe1a946 100644
--- a/be/src/runtime/row_batch.cpp
+++ b/be/src/runtime/row_batch.cpp
@@ -172,6 +172,9 @@ RowBatch::RowBatch(const RowDescriptor& row_desc, const PRowBatch& input_batch)
             // copy collection slots
             for (auto slot_collection : desc->collection_slots()) {
                 DCHECK(slot_collection->type().is_collection_type());
+                if (tuple->is_null(slot_collection->null_indicator_offset())) {
+                    continue;
+                }
 
                 CollectionValue* array_val =
                         tuple->get_collection_slot(slot_collection->tuple_offset());


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