[fix](array-type) fix be occasional coredump when use stream load (#11997)
Co-authored-by: hucheng01 <hucheng01@baidu.com>
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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());
|
||||
|
||||
Reference in New Issue
Block a user