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

Method CopyVarLenData

be/src/runtime/sorter.cc:694–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694void Sorter::Run::CopyVarLenData(const vector<StringValue*>& string_values,
695 const vector<pair<CollectionValue*, int64_t>>& collection_values_and_sizes,
696 uint8_t* dest) {
697 for (StringValue* string_val: string_values) {
698 DCHECK(!string_val->IsSmall());
699 Ubsan::MemCpy(dest, string_val->Ptr(), string_val->Len());
700 string_val->SetPtr(reinterpret_cast<char*>(dest));
701 dest += string_val->Len();
702 }
703
704 for (const pair<CollectionValue*, int64_t>& coll_val_and_size
705 : collection_values_and_sizes) {
706 CollectionValue* coll_val = coll_val_and_size.first;
707 int64_t byte_size = coll_val_and_size.second;
708 Ubsan::MemCpy(dest, coll_val->ptr, byte_size);
709 coll_val->ptr = dest;
710 dest += byte_size;
711 }
712}
713
714uint64_t PackOffset(uint64_t page_index, uint32_t page_offset) {
715 return (page_index << 32) | page_offset;

Callers

nothing calls this directly

Calls 4

IsSmallMethod · 0.45
PtrMethod · 0.45
LenMethod · 0.45
SetPtrMethod · 0.45

Tested by

no test coverage detected