From 77d81687b3f4813af2be3d393d9cb37e0c190884 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Wed, 31 Jul 2019 13:54:50 +0300 Subject: [PATCH] Update FormatFactory. --- dbms/src/Formats/FormatFactory.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dbms/src/Formats/FormatFactory.cpp b/dbms/src/Formats/FormatFactory.cpp index 3dfdc07b71d..c4315528e4b 100644 --- a/dbms/src/Formats/FormatFactory.cpp +++ b/dbms/src/Formats/FormatFactory.cpp @@ -95,10 +95,13 @@ BlockOutputStreamPtr FormatFactory::getOutput(const String & name, WriteBuffer & { /// TODO: rewrite auto format = getOutputFormat("PrettyCompact", buf, sample, context); - return std::make_shared( - std::make_shared( - std::make_shared(format), - sample, context.getSettingsRef().output_format_pretty_max_rows, 0), sample); + auto res = std::make_shared( + std::make_shared(format), + sample, context.getSettingsRef().output_format_pretty_max_rows, 0); + + res->disableFlush(); + + return std::make_shared(res, sample); } auto format = getOutputFormat(name, buf, sample, context);