aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2023-12-09 10:11:16 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2023-12-09 10:33:35 +0300
commitfa9347ea5cf4447897b525032be9a711cc3dc583 (patch)
tree4f3d4f493e4cfb43a3c8b5f7e279621c41e0e978 /contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h
parentf82bfd2a08a51c4815a4cde64974f819ed4f7128 (diff)
downloadydb-fa9347ea5cf4447897b525032be9a711cc3dc583.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h')
-rw-r--r--contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h b/contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h
index e05d189afe..2de9369846 100644
--- a/contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h
+++ b/contrib/clickhouse/src/Processors/Formats/Impl/JSONEachRowRowOutputFormat.h
@@ -2,7 +2,9 @@
#include <Core/Block.h>
#include <IO/WriteBuffer.h>
+#include <IO/PeekableWriteBuffer.h>
#include <Processors/Formats/OutputFormatWithUTF8ValidationAdaptor.h>
+#include <Processors/Formats/RowOutputFormatWithExceptionHandlerAdaptor.h>
#include <Formats/FormatSettings.h>
@@ -11,7 +13,7 @@ namespace DB
/** The stream for outputting data in JSON format, by object per line.
*/
-class JSONEachRowRowOutputFormat : public RowOutputFormatWithUTF8ValidationAdaptor
+class JSONEachRowRowOutputFormat : public RowOutputFormatWithExceptionHandlerAdaptor<RowOutputFormatWithUTF8ValidationAdaptor, bool>
{
public:
JSONEachRowRowOutputFormat(
@@ -37,13 +39,16 @@ protected:
void writePrefix() override;
void writeSuffix() override;
+ void resetFormatterImpl() override;
+
size_t field_number = 0;
bool pretty_json;
+ FormatSettings settings;
+ WriteBuffer * ostr;
+
private:
Names fields;
-
- FormatSettings settings;
};
}