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

Function UnpackSchemaMessage

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

Source from the content-addressed store, hash-verified

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

Callers 3

OpenMethod · 0.85
OpenAsyncMethod · 0.85

Calls 9

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

Tested by

no test coverage detected