| 1090 | } |
| 1091 | |
| 1092 | Status OnRecordBatchMessageDecoded(std::unique_ptr<Message> message) { |
| 1093 | if (message->type() == MessageType::DICTIONARY_BATCH) { |
| 1094 | return ReadDictionary(*message); |
| 1095 | } else { |
| 1096 | CHECK_HAS_BODY(*message); |
| 1097 | ARROW_ASSIGN_OR_RAISE(auto reader, Buffer::GetReader(message->body())); |
| 1098 | IpcReadContext context(&dictionary_memo_, options_, swap_endian_); |
| 1099 | ARROW_ASSIGN_OR_RAISE( |
| 1100 | auto batch_with_metadata, |
| 1101 | ReadRecordBatchInternal(*message->metadata(), schema_, field_inclusion_mask_, |
| 1102 | context, reader.get())); |
| 1103 | ++stats_.num_record_batches; |
| 1104 | return listener_->OnRecordBatchWithMetadataDecoded(batch_with_metadata); |
| 1105 | } |
| 1106 | } |
| 1107 | |
| 1108 | // Read dictionary from dictionary batch |
| 1109 | Status ReadDictionary(const Message& message) { |
nothing calls this directly
no test coverage detected