MCPcopy Create free account
hub / github.com/bytedance/bolt / serialize

Method serialize

bolt/serializers/ArrowSerializer.cpp:753–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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_;

Callers 3

appendMethod · 0.45
serializeRangesMethod · 0.45
serializeRangesMethod · 0.45

Calls 4

asRowTypeFunction · 0.85
typeMethod · 0.45
appendMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected