| 3482 | codec_(common::compressionKindToCodec(compressionKind)) {} |
| 3483 | |
| 3484 | void serialize( |
| 3485 | const RowVectorPtr& vector, |
| 3486 | const folly::Range<const IndexRange*>& ranges, |
| 3487 | Scratch& /* scratch */, |
| 3488 | OutputStream* stream) override { |
| 3489 | const auto numRows = rangesTotalSize(ranges); |
| 3490 | const auto rowType = vector->type(); |
| 3491 | const auto numChildren = vector->childrenSize(); |
| 3492 | |
| 3493 | StreamArena arena(pool_); |
| 3494 | std::vector<std::unique_ptr<VectorStream>> streams(numChildren); |
| 3495 | for (int i = 0; i < numChildren; i++) { |
| 3496 | streams[i] = std::make_unique<VectorStream>( |
| 3497 | rowType->childAt(i), |
| 3498 | std::nullopt, |
| 3499 | vector->childAt(i), |
| 3500 | &arena, |
| 3501 | numRows, |
| 3502 | useLosslessTimestamp_); |
| 3503 | |
| 3504 | serializeColumn(vector->childAt(i).get(), ranges, streams[i].get()); |
| 3505 | } |
| 3506 | |
| 3507 | flushStreams(streams, numRows, arena, *codec_, stream); |
| 3508 | } |
| 3509 | |
| 3510 | private: |
| 3511 | memory::MemoryPool* pool_; |
nothing calls this directly
no test coverage detected