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

Method Open

cpp/src/arrow/ipc/message.cc:89–111  ·  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 std::shared_ptr<KeyValueMetadata> md;
106 RETURN_NOT_OK(internal::GetKeyValueMetadata(message_->custom_metadata(), &md));
107 custom_metadata_ = std::move(md); // const-ify
108 }
109
110 return Status::OK();
111 }
112
113 MessageType type() const {
114 switch (message_->header_type()) {

Callers

nothing calls this directly

Calls 8

VerifyMessageFunction · 0.85
GetKeyValueMetadataFunction · 0.85
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