| 449 | } |
| 450 | |
| 451 | VectorPtr readRowVector( |
| 452 | const TypePtr& type, |
| 453 | vector_size_t size, |
| 454 | std::istream& in, |
| 455 | memory::MemoryPool* pool) { |
| 456 | // Nulls buffer. |
| 457 | BufferPtr nulls = readOptionalBuffer(in, pool); |
| 458 | |
| 459 | // Child vectors. |
| 460 | auto numChildren = read<int32_t>(in); |
| 461 | std::vector<VectorPtr> children; |
| 462 | children.reserve(numChildren); |
| 463 | for (auto i = 0; i < numChildren; ++i) { |
| 464 | bool present = read<bool>(in); |
| 465 | if (present) { |
| 466 | children.push_back(restoreVector(in, pool)); |
| 467 | } else { |
| 468 | children.push_back(nullptr); |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | return std::make_shared<RowVector>(pool, type, nulls, size, children); |
| 473 | } |
| 474 | |
| 475 | void writeArrayVector(const BaseVector& vector, std::ostream& out) { |
| 476 | // Nulls buffer. |
no test coverage detected