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

Function restoreType

bolt/vector/VectorSaver.cpp:597–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597TypePtr restoreType(std::istream& in) {
598 static folly::once_flag kOnce;
599
600 folly::call_once(kOnce, []() { Type::registerSerDe(); });
601
602 auto serialized = read<std::string>(in);
603 auto json = folly::parseJson(serialized);
604 return ISerializable::deserialize<Type>(json);
605}
606
607void saveVector(const BaseVector& vector, std::ostream& out) {
608 // Encoding.

Callers 2

restoreVectorFunction · 0.85
testTypeRoundTripMethod · 0.85

Calls

no outgoing calls

Tested by 1

testTypeRoundTripMethod · 0.68