| 391 | |
| 392 | template <bool COLLECT_VAR_LEN_VALS> |
| 393 | void 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 | |
| 410 | void RawValue::PrintValue( |
| 411 | const void* value, const ColumnType& type, int scale, std::stringstream* stream, |
nothing calls this directly
no test coverage detected