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

Function WriteDictionaryMessage

cpp/src/arrow/ipc/metadata_internal.cc:1376–1392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374}
1375
1376Status WriteDictionaryMessage(
1377 int64_t id, bool is_delta, int64_t length, int64_t body_length,
1378 const std::shared_ptr<const KeyValueMetadata>& custom_metadata,
1379 const std::vector<FieldMetadata>& nodes, const std::vector<BufferMetadata>& buffers,
1380 const std::vector<int64_t>& variadic_buffer_counts, const IpcWriteOptions& options,
1381 std::shared_ptr<Buffer>* out) {
1382 FBB fbb;
1383 RecordBatchOffset record_batch;
1384 RETURN_NOT_OK(MakeRecordBatch(fbb, length, body_length, nodes, buffers,
1385 variadic_buffer_counts, options, &record_batch));
1386 auto dictionary_batch =
1387 flatbuf::CreateDictionaryBatch(fbb, id, record_batch, is_delta).Union();
1388 return WriteFBMessage(fbb, flatbuf::MessageHeader::MessageHeader_DictionaryBatch,
1389 dictionary_batch, body_length, options.metadata_version,
1390 custom_metadata, options.memory_pool)
1391 .Value(out);
1392}
1393
1394static flatbuffers::Offset<flatbuffers::Vector<const flatbuf::Block*>>
1395FileBlocksToFlatbuffer(FBB& fbb, const std::vector<FileBlock>& blocks) {

Callers 1

SerializeMetadataMethod · 0.85

Calls 4

CreateDictionaryBatchFunction · 0.85
WriteFBMessageFunction · 0.85
MakeRecordBatchFunction · 0.70
ValueMethod · 0.45

Tested by

no test coverage detected