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