Adding support for streaming mode to JSONEachRowRowOutputFormat

This commit is contained in:
Vitaliy Zakaznikov 2020-04-26 15:56:45 +02:00
parent 369b4d53ef
commit 626468d255
2 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,12 @@ JSONEachRowRowOutputFormat::JSONEachRowRowOutputFormat(WriteBuffer & out_, const
}
}
void JSONEachRowRowOutputFormat::consume(DB::Chunk chunk)
{
IRowOutputFormat::consume(std::move(chunk));
if (settings.enable_streaming)
flush();
}
void JSONEachRowRowOutputFormat::writeField(const IColumn & column, const IDataType & type, size_t row_num)
{

View File

@ -25,6 +25,7 @@ public:
void writeRowEndDelimiter() override;
protected:
void consume(Chunk chunk) override;
/// No totals and extremes.
void consumeTotals(Chunk) override {}
void consumeExtremes(Chunk) override {}