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

Function UnpackSchemaMessage

cpp/src/arrow/ipc/reader.cc:856–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854}
855
856Status UnpackSchemaMessage(const void* opaque_schema, const IpcReadOptions& options,
857 DictionaryMemo* dictionary_memo,
858 std::shared_ptr<Schema>* schema,
859 std::shared_ptr<Schema>* out_schema,
860 std::vector<bool>* field_inclusion_mask, bool* swap_endian) {
861 RETURN_NOT_OK(internal::GetSchema(opaque_schema, dictionary_memo, schema));
862
863 // If we are selecting only certain fields, populate the inclusion mask now
864 // for fast lookups
865 RETURN_NOT_OK(GetInclusionMaskAndOutSchema(*schema, options.included_fields,
866 field_inclusion_mask, out_schema));
867 *swap_endian = options.ensure_native_endian && !out_schema->get()->is_native_endian();
868 if (*swap_endian) {
869 // create a new schema with native endianness before swapping endian in ArrayData
870 *schema = schema->get()->WithEndianness(Endianness::Native);
871 *out_schema = out_schema->get()->WithEndianness(Endianness::Native);
872 }
873 return Status::OK();
874}
875
876Status UnpackSchemaMessage(const Message& message, const IpcReadOptions& options,
877 DictionaryMemo* dictionary_memo,

Callers 3

OpenMethod · 0.85
OpenAsyncMethod · 0.85

Calls 8

is_native_endianMethod · 0.80
WithEndiannessMethod · 0.80
GetSchemaFunction · 0.70
OKFunction · 0.50
getMethod · 0.45
typeMethod · 0.45
headerMethod · 0.45

Tested by

no test coverage detected