| 399 | } |
| 400 | |
| 401 | void TupleDescriptor::AddSlot(SlotDescriptor* slot) { |
| 402 | slots_.push_back(slot); |
| 403 | // If this is a tuple for struct children then we populate the 'string_slots_' field (in |
| 404 | // case of a var len string type) or the 'collection_slots_' field (in case of a |
| 405 | // collection type) of the topmost tuple and not this one. |
| 406 | TupleDescriptor* const target_tuple = isTupleOfStructSlot() ? master_tuple_ : this; |
| 407 | if (slot->type().IsVarLenStringType()) { |
| 408 | target_tuple->string_slots_.push_back(slot); |
| 409 | target_tuple->has_varlen_slots_ = true; |
| 410 | } |
| 411 | if (slot->type().IsCollectionType()) { |
| 412 | target_tuple->collection_slots_.push_back(slot); |
| 413 | target_tuple->has_varlen_slots_ = true; |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | string TupleDescriptor::DebugString() const { |
| 418 | stringstream out; |
no test coverage detected