MCPcopy Create free account
hub / github.com/apache/impala / FixUpCollectionsForRead

Method FixUpCollectionsForRead

be/src/runtime/buffered-tuple-stream.cc:929–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

927}
928
929void BufferedTupleStream::FixUpCollectionsForRead(
930 const vector<SlotDescriptor*>& collection_slots, ReadIterator* RESTRICT read_iter,
931 Tuple* tuple) {
932 DCHECK(tuple != nullptr);
933 for (const SlotDescriptor* slot_desc : collection_slots) {
934 if (tuple->IsNull(slot_desc->null_indicator_offset())) continue;
935
936 CollectionValue* cv = tuple->GetCollectionSlot(slot_desc->tuple_offset());
937 const TupleDescriptor& item_desc = *slot_desc->children_tuple_descriptor();
938 int coll_byte_size = cv->num_tuples * item_desc.byte_size();
939 cv->ptr = reinterpret_cast<uint8_t*>(read_iter->read_ptr_);
940 read_iter->AdvanceReadPtr(coll_byte_size);
941
942 if (!item_desc.HasVarlenSlots()) continue;
943 uint8_t* coll_data = cv->ptr;
944 for (int i = 0; i < cv->num_tuples; ++i) {
945 Tuple* item = reinterpret_cast<Tuple*>(coll_data);
946 FixUpStringsForRead(item_desc.string_slots(), read_iter, item);
947 FixUpCollectionsForRead(item_desc.collection_slots(), read_iter, item);
948 coll_data += item_desc.byte_size();
949 }
950 }
951}
952
953int64_t BufferedTupleStream::ComputeRowSize(TupleRow* row)
954 const noexcept {

Callers

nothing calls this directly

Calls 7

GetCollectionSlotMethod · 0.80
tuple_offsetMethod · 0.80
AdvanceReadPtrMethod · 0.80
IsNullMethod · 0.45
byte_sizeMethod · 0.45
HasVarlenSlotsMethod · 0.45

Tested by

no test coverage detected