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

Function UnpackSchemaMessage

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

Source from the content-addressed store, hash-verified

870}
871
872Status UnpackSchemaMessage(const void* opaque_schema, const IpcReadOptions& options,
873 DictionaryMemo* dictionary_memo,
874 std::shared_ptr<Schema>* schema,
875 std::shared_ptr<Schema>* out_schema,
876 std::vector<bool>* field_inclusion_mask,
877 Endianness* original_endianness, bool* swap_endian) {
878 RETURN_NOT_OK(internal::GetSchema(opaque_schema, dictionary_memo, schema));
879
880 // If we are selecting only certain fields, populate the inclusion mask now
881 // for fast lookups
882 RETURN_NOT_OK(GetInclusionMaskAndOutSchema(*schema, options.included_fields,
883 field_inclusion_mask, out_schema));
884 *original_endianness = out_schema->get()->endianness();
885 *swap_endian = options.ensure_native_endian && !out_schema->get()->is_native_endian();
886 if (*swap_endian) {
887 // create a new schema with native endianness before swapping endian in ArrayData
888 *schema = schema->get()->WithEndianness(Endianness::Native);
889 *out_schema = out_schema->get()->WithEndianness(Endianness::Native);
890 }
891 return Status::OK();
892}
893
894Status UnpackSchemaMessage(const Message& message, const IpcReadOptions& options,
895 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