| 855 | } |
| 856 | |
| 857 | Status 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 | |
| 879 | Status UnpackSchemaMessage(const Message& message, const IpcReadOptions& options, |
| 880 | DictionaryMemo* dictionary_memo, |
no test coverage detected