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

Method GetSchema

cpp/src/arrow/flight/types.cc:301–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301arrow::Result<std::shared_ptr<Schema>> FlightInfo::GetSchema(
302 ipc::DictionaryMemo* dictionary_memo) const {
303 if (reconstructed_schema_) {
304 return schema_;
305 } else if (data_.schema.empty()) {
306 reconstructed_schema_ = true;
307 return schema_;
308 }
309 // Create a non-owned Buffer to avoid copying
310 io::BufferReader schema_reader(std::make_shared<Buffer>(data_.schema));
311 RETURN_NOT_OK(ipc::ReadSchema(&schema_reader, dictionary_memo).Value(&schema_));
312 reconstructed_schema_ = true;
313 return schema_;
314}
315
316arrow::Status FlightInfo::SerializeToString(std::string* out) const {
317 return SerializeToProtoString<pb::FlightInfo>("FlightInfo", *this, out);

Callers 7

gaflight_info_get_schemaFunction · 0.45
ASSERT_OK_AND_ASSIGNFunction · 0.45
ASSERT_OK_AND_ASSIGNMethod · 0.45
TEST_FMethod · 0.45
TestDoExchangeErrorMethod · 0.45

Calls 3

ReadSchemaFunction · 0.50
emptyMethod · 0.45
ValueMethod · 0.45

Tested by 4

ASSERT_OK_AND_ASSIGNFunction · 0.36
ASSERT_OK_AND_ASSIGNMethod · 0.36
TEST_FMethod · 0.36
TestDoExchangeErrorMethod · 0.36