2021-10-13 10:01:08 +00:00
|
|
|
#include <Processors/Formats/Impl/NullFormat.h>
|
2019-02-19 18:41:18 +00:00
|
|
|
#include <Formats/FormatFactory.h>
|
2021-10-13 10:01:08 +00:00
|
|
|
#include <IO/WriteBuffer.h>
|
2019-02-19 18:41:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2021-10-13 10:01:08 +00:00
|
|
|
WriteBuffer NullOutputFormat::empty_buffer(nullptr, 0);
|
2019-02-19 18:41:18 +00:00
|
|
|
|
2021-10-11 16:11:50 +00:00
|
|
|
void registerOutputFormatNull(FormatFactory & factory)
|
2019-02-19 18:41:18 +00:00
|
|
|
{
|
2021-10-11 16:11:50 +00:00
|
|
|
factory.registerOutputFormat("Null", [](
|
2021-10-13 10:01:08 +00:00
|
|
|
WriteBuffer &,
|
2019-02-19 18:41:18 +00:00
|
|
|
const Block & sample,
|
2020-10-06 12:47:52 +00:00
|
|
|
const RowOutputFormatParams &,
|
2019-02-19 18:41:18 +00:00
|
|
|
const FormatSettings &)
|
|
|
|
{
|
2021-10-13 10:01:08 +00:00
|
|
|
return std::make_shared<NullOutputFormat>(sample);
|
2019-02-19 18:41:18 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|