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

Function PackActionResult

cpp/src/arrow/flight/sql/server.cc:434–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434arrow::Result<Result> PackActionResult(const google::protobuf::Message& message) {
435 google::protobuf::Any any;
436#if PROTOBUF_VERSION >= 3015000
437 if (!any.PackFrom(message)) {
438 return Status::IOError("Failed to pack ", message.GetTypeName());
439 }
440#else
441 any.PackFrom(message);
442#endif
443
444 std::string buffer;
445#if PROTOBUF_VERSION >= 3015000
446 if (!any.SerializeToString(&buffer)) {
447 return Status::IOError("Failed to serialize packed ", message.GetTypeName());
448 }
449#else
450 any.SerializeToString(&buffer);
451#endif
452 return Result{Buffer::FromString(std::move(buffer))};
453}
454
455arrow::Result<Result> PackActionResult(ActionBeginSavepointResult result) {
456 pb::sql::ActionBeginSavepointResult pb_result;

Callers 1

Calls 5

IOErrorFunction · 0.85
FromStringFunction · 0.85
GetTypeNameMethod · 0.45
SerializeToStringMethod · 0.45
SerializeToBufferMethod · 0.45

Tested by

no test coverage detected