| 927 | } |
| 928 | |
| 929 | void 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 | |
| 953 | int64_t BufferedTupleStream::ComputeRowSize(TupleRow* row) |
| 954 | const noexcept { |
nothing calls this directly
no test coverage detected