diff --git a/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.cpp b/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.cpp index f862a07173b6211d43236fba205a01458154911b..4ca151a6e089d401a83ed9ef4de566d81adb7a5a 100644 --- a/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.cpp +++ b/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.cpp @@ -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) { diff --git a/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h b/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h index d2b6937cd01a497d38846aeec846c0c119bab94f..9ed86701292175a12261b9364906c3abe01e1f39 100644 --- a/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h +++ b/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h @@ -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 {}