pitrou commented on a change in pull request #9348: URL: https://github.com/apache/arrow/pull/9348#discussion_r568659268
########## File path: cpp/src/arrow/ipc/writer.cc ########## @@ -1001,6 +1001,17 @@ class ARROW_EXPORT IpcFormatWriter : public RecordBatchWriter { return Status::OK(); } + Status WriteTable(const Table& table, int64_t max_chunksize) override { + std::shared_ptr<Table> owned_table; + const Table* table_ptr = &table; + if (is_file_format_ && options_.unify_dictionaries) { + ARROW_ASSIGN_OR_RAISE(owned_table, + DictionaryUnifier::UnifyTable(table, options_.memory_pool)); + table_ptr = owned_table.get(); + } + return RecordBatchWriter::WriteTable(*table_ptr, max_chunksize); Review comment: Thanks for the suggestion, it's better indeed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org