Fix code style

This commit is contained in:
Alexey Korepanov 2024-07-08 13:53:24 +02:00
parent 7fbcaeaae2
commit a3360d0e63
2 changed files with 11 additions and 24 deletions

View File

@ -1,6 +1,6 @@
#include <Processors/Formats/Impl/JSONCompactWithProgressRowOutputFormat.h>
#include <Formats/FormatFactory.h>
#include <Formats/JSONUtils.h>
#include <Processors/Formats/Impl/JSONCompactWithProgressRowOutputFormat.h>
#include <IO/WriteHelpers.h>
@ -9,10 +9,7 @@ namespace DB
{
JSONCompactWithProgressRowOutputFormat::JSONCompactWithProgressRowOutputFormat(
WriteBuffer & out_,
const Block & header,
const FormatSettings & settings_,
bool yield_strings_)
WriteBuffer & out_, const Block & header, const FormatSettings & settings_, bool yield_strings_)
: JSONRowOutputFormat(out_, header, settings_, yield_strings_)
{
}
@ -139,21 +136,15 @@ void JSONCompactWithProgressRowOutputFormat::finalizeImpl()
void registerOutputFormatJSONCompactWithProgress(FormatFactory & factory)
{
factory.registerOutputFormat("JSONCompactWithProgress", [](
WriteBuffer & buf,
const Block & sample,
const FormatSettings & format_settings)
{
return std::make_shared<JSONCompactWithProgressRowOutputFormat>(buf, sample, format_settings, false);
});
factory.registerOutputFormat(
"JSONCompactWithProgress",
[](WriteBuffer & buf, const Block & sample, const FormatSettings & format_settings)
{ return std::make_shared<JSONCompactWithProgressRowOutputFormat>(buf, sample, format_settings, false); });
factory.registerOutputFormat("JSONCompactWithProgressStrings", [](
WriteBuffer & buf,
const Block & sample,
const FormatSettings & format_settings)
{
return std::make_shared<JSONCompactWithProgressRowOutputFormat>(buf, sample, format_settings, true);
});
factory.registerOutputFormat(
"JSONCompactWithProgressStrings",
[](WriteBuffer & buf, const Block & sample, const FormatSettings & format_settings)
{ return std::make_shared<JSONCompactWithProgressRowOutputFormat>(buf, sample, format_settings, true); });
}
}

View File

@ -14,11 +14,7 @@ struct FormatSettings;
class JSONCompactWithProgressRowOutputFormat final : public JSONRowOutputFormat
{
public:
JSONCompactWithProgressRowOutputFormat(
WriteBuffer & out_,
const Block & header,
const FormatSettings & settings_,
bool yield_strings_);
JSONCompactWithProgressRowOutputFormat(WriteBuffer & out_, const Block & header, const FormatSettings & settings_, bool yield_strings_);
String getName() const override { return "JSONCompactWithProgressRowOutputFormat"; }