emkornfield commented on a change in pull request #10230:
URL: https://github.com/apache/arrow/pull/10230#discussion_r631163305
##########
File path: cpp/src/arrow/csv/writer.cc
##########
@@ -403,34 +415,44 @@ class CSVConverter {
}
static constexpr int64_t kColumnSizeGuess = 8;
+ io::OutputStream* sink_;
+ std::shared_ptr<io::OutputStream> owned_sink_;
std::vector<std::unique_ptr<ColumnPopulator>> column_populators_;
std::vector<int32_t, arrow::stl::allocator<int32_t>> offsets_;
std::shared_ptr<ResizableBuffer> data_buffer_;
const std::shared_ptr<Schema> schema_;
- MemoryPool* pool_;
+ WriteOptions options_;
+ ipc::WriteStats stats_;
};
} // namespace
-Status WriteCSV(const Table& table, const WriteOptions& options, MemoryPool*
pool,
+Status WriteCSV(const Table& table, const WriteOptions& options,
arrow::io::OutputStream* output) {
- if (pool == nullptr) {
- pool = default_memory_pool();
- }
- ASSIGN_OR_RAISE(std::unique_ptr<CSVConverter> converter,
- CSVConverter::Make(table.schema(), pool));
- return converter->WriteCSV(table, options, output);
+ ASSIGN_OR_RAISE(auto converter, MakeCSVWriter(output, table.schema(),
options));
Review comment:
nit: should converter now be writer? (same question below)
--
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:
[email protected]