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

Method serialize

bolt/serializers/PrestoSerializer.cpp:3484–3508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

rangesTotalSizeFunction · 0.85
serializeColumnFunction · 0.85
flushStreamsFunction · 0.85
childAtMethod · 0.80
typeMethod · 0.45
childrenSizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected