| 751 | } |
| 752 | |
| 753 | void serialize( |
| 754 | const RowVectorPtr& vector, |
| 755 | const folly::Range<const IndexRange*>& ranges, |
| 756 | Scratch& scratch, |
| 757 | OutputStream* stream) override { |
| 758 | size_t numRows = 0; |
| 759 | for (const auto& range : ranges) { |
| 760 | numRows += range.size; |
| 761 | } |
| 762 | StreamArena arena(pool_); |
| 763 | auto serializer = std::make_unique<ArrowVectorSerializer>( |
| 764 | asRowType(vector->type()), |
| 765 | std::vector<VectorEncoding::Simple>{}, |
| 766 | static_cast<int32_t>(numRows), |
| 767 | &arena, |
| 768 | useLosslessTimestamp_, |
| 769 | compressionKind_, |
| 770 | &arrowBridgeOptions_); |
| 771 | serializer->append(vector, ranges, scratch); |
| 772 | serializer->flush(stream); |
| 773 | } |
| 774 | |
| 775 | private: |
| 776 | memory::MemoryPool* pool_; |
no test coverage detected