Revert changes for CSVRowOutputFormat.

This commit is contained in:
Nikolai Kochetov 2020-04-27 18:21:53 +03:00
parent 201a184d31
commit 2f06180c5e
3 changed files with 2 additions and 7 deletions

View File

@ -13,6 +13,8 @@ namespace DB
*/ */
struct FormatSettings struct FormatSettings
{ {
/// Format will be used for streaming. Not every formats support it
/// Option means that each chunk of data need to be formatted independently. Also each chunk will be flushed at the end of processing.
bool enable_streaming = false; bool enable_streaming = false;
struct JSON struct JSON

View File

@ -18,12 +18,6 @@ CSVRowOutputFormat::CSVRowOutputFormat(WriteBuffer & out_, const Block & header_
data_types[i] = sample.safeGetByPosition(i).type; data_types[i] = sample.safeGetByPosition(i).type;
} }
void CSVRowOutputFormat::consume(DB::Chunk chunk)
{
IRowOutputFormat::consume(std::move(chunk));
if (format_settings.enable_streaming)
flush();
}
void CSVRowOutputFormat::writePrefix() void CSVRowOutputFormat::writePrefix()
{ {

View File

@ -39,7 +39,6 @@ public:
protected: protected:
void consume(Chunk chunk) override;
bool with_names; bool with_names;
const FormatSettings format_settings; const FormatSettings format_settings;
DataTypes data_types; DataTypes data_types;