MCPcopy Create free account
hub / github.com/apache/arrow / PackToAnyAndSerialize

Function PackToAnyAndSerialize

cpp/src/arrow/flight/serialization_internal.cc:53–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51namespace {
52
53Status PackToAnyAndSerialize(const google::protobuf::Message& command, std::string* out) {
54 google::protobuf::Any any;
55#if PROTOBUF_VERSION >= 3015000
56 if (!any.PackFrom(command)) {
57 return Status::SerializationError("Failed to pack ", command.GetTypeName());
58 }
59#else
60 any.PackFrom(command);
61#endif
62
63#if PROTOBUF_VERSION >= 3015000
64 if (!any.SerializeToString(out)) {
65 return Status::SerializationError("Failed to serialize ", command.GetTypeName());
66 }
67#else
68 any.SerializeToString(out);
69#endif
70 return Status::OK();
71}
72
73} // namespace
74

Callers 2

PackProtoCommandFunction · 0.85
PackProtoActionFunction · 0.85

Calls 4

SerializationErrorFunction · 0.85
OKFunction · 0.50
GetTypeNameMethod · 0.45
SerializeToStringMethod · 0.45

Tested by

no test coverage detected