aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.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/JSONCompactEachRowRowOutputFormat.h
parentf82bfd2a08a51c4815a4cde64974f819ed4f7128 (diff)
downloadydb-fa9347ea5cf4447897b525032be9a711cc3dc583.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/clickhouse/src/Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.h')
-rw-r--r--contrib/clickhouse/src/Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/clickhouse/src/Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.h b/contrib/clickhouse/src/Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.h
index 2be39669dd..bd32592a4a 100644
--- a/contrib/clickhouse/src/Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.h
+++ b/contrib/clickhouse/src/Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.h
@@ -3,15 +3,16 @@
#include <Core/Block.h>
#include <IO/WriteBuffer.h>
#include <Processors/Formats/OutputFormatWithUTF8ValidationAdaptor.h>
+#include <Processors/Formats/RowOutputFormatWithExceptionHandlerAdaptor.h>
#include <Formats/FormatSettings.h>
namespace DB
{
-/** The stream for outputting data in JSON format, by object per line.
+/** The stream for outputting data in JSON format, by JSON array per line.
*/
-class JSONCompactEachRowRowOutputFormat final : public RowOutputFormatWithUTF8ValidationAdaptor
+class JSONCompactEachRowRowOutputFormat final : public RowOutputFormatWithExceptionHandlerAdaptor<RowOutputFormatWithUTF8ValidationAdaptor, bool>
{
public:
JSONCompactEachRowRowOutputFormat(
@@ -33,6 +34,9 @@ private:
void writeFieldDelimiter() override;
void writeRowStartDelimiter() override;
void writeRowEndDelimiter() override;
+ void writeSuffix() override;
+
+ void resetFormatterImpl() override;
bool supportTotals() const override { return true; }
void consumeTotals(Chunk) override;
@@ -43,5 +47,7 @@ private:
bool with_names;
bool with_types;
bool yield_strings;
+
+ WriteBuffer * ostr;
};
}