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

Method WritePrimitiveCollectVarlen

be/src/runtime/raw-value.cc:393–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391
392template <bool COLLECT_VAR_LEN_VALS>
393void RawValue::WritePrimitiveCollectVarlen(const void* value, Tuple* tuple,
394 const SlotDescriptor* slot_desc, MemPool* pool, vector<StringValue*>* string_values) {
395 DCHECK(value != nullptr && tuple != nullptr && slot_desc != nullptr);
396
397 void* dst = tuple->GetSlot(slot_desc->tuple_offset());
398 WriteNonNullPrimitive(value, dst, slot_desc->type(), pool);
399 if constexpr (COLLECT_VAR_LEN_VALS) {
400 DCHECK(string_values != nullptr);
401 if (slot_desc->type().IsVarLenStringType()) {
402 StringValue* str_value = reinterpret_cast<StringValue*>(dst);
403 if (!str_value->IsSmall()) string_values->push_back(str_value);
404 } else if (slot_desc->type().IsCollectionType()) {
405 DCHECK(false) << "Collections should be handled in WriteCollection.";
406 }
407 }
408}
409
410void RawValue::PrintValue(
411 const void* value, const ColumnType& type, int scale, std::stringstream* stream,

Callers

nothing calls this directly

Calls 7

tuple_offsetMethod · 0.80
IsVarLenStringTypeMethod · 0.80
push_backMethod · 0.80
IsCollectionTypeMethod · 0.80
GetSlotMethod · 0.45
typeMethod · 0.45
IsSmallMethod · 0.45

Tested by

no test coverage detected