| 956 | } // namespace |
| 957 | |
| 958 | Result<std::shared_ptr<RecordBatch>> ReadRecordBatch( |
| 959 | const Buffer& metadata, const std::shared_ptr<Schema>& schema, |
| 960 | const DictionaryMemo* dictionary_memo, const IpcReadOptions& options, |
| 961 | io::RandomAccessFile* file) { |
| 962 | std::shared_ptr<Schema> out_schema; |
| 963 | // Empty means do not use |
| 964 | std::vector<bool> inclusion_mask; |
| 965 | IpcReadContext context(const_cast<DictionaryMemo*>(dictionary_memo), options, false); |
| 966 | RETURN_NOT_OK(GetInclusionMaskAndOutSchema(schema, context.options.included_fields, |
| 967 | &inclusion_mask, &out_schema)); |
| 968 | ARROW_ASSIGN_OR_RAISE( |
| 969 | auto batch_and_custom_metadata, |
| 970 | ReadRecordBatchInternal(metadata, schema, inclusion_mask, context, file)); |
| 971 | return batch_and_custom_metadata.batch; |
| 972 | } |
| 973 | |
| 974 | Result<std::shared_ptr<RecordBatch>> ReadRecordBatch( |
| 975 | const std::shared_ptr<Schema>& schema, const DictionaryMemo* dictionary_memo, |