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

Method Open

cpp/src/arrow/ipc/message.cc:89–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 : metadata_(std::move(metadata)), message_(nullptr), body_(std::move(body)) {}
88
89 Status Open() {
90 RETURN_NOT_OK(
91 internal::VerifyMessage(metadata_->data(), metadata_->size(), &message_));
92
93 // Check that the metadata version is supported
94 if (message_->version() < internal::kMinMetadataVersion) {
95 return Status::Invalid("Old metadata version not supported");
96 }
97
98 if (message_->version() > flatbuf::MetadataVersion::MetadataVersion_MAX) {
99 return Status::Invalid("Unsupported future MetadataVersion: ",
100 static_cast<int16_t>(message_->version()));
101 }
102
103 if (message_->custom_metadata() != nullptr) {
104 // Deserialize from Flatbuffers if first time called
105 ARROW_ASSIGN_OR_RAISE(custom_metadata_,
106 internal::GetKeyValueMetadata(message_->custom_metadata()));
107 }
108
109 return Status::OK();
110 }
111
112 MessageType type() const {
113 switch (message_->header_type()) {

Callers

nothing calls this directly

Calls 9

VerifyMessageFunction · 0.85
GetKeyValueMetadataFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
InvalidFunction · 0.50
OKFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45
versionMethod · 0.45
custom_metadataMethod · 0.45

Tested by

no test coverage detected