2019-02-19 18:41:18 +00:00
|
|
|
#include <Processors/Formats/IOutputFormat.h>
|
|
|
|
#include <Formats/FormatFactory.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class NullOutputFormat : public IOutputFormat
|
|
|
|
{
|
|
|
|
public:
|
2019-04-09 09:25:57 +00:00
|
|
|
NullOutputFormat(const Block & header, WriteBuffer & out_) : IOutputFormat(header, out_) {}
|
2019-02-19 18:41:18 +00:00
|
|
|
|
|
|
|
String getName() const override { return "NullOutputFormat"; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void consume(Chunk) override {}
|
|
|
|
};
|
|
|
|
|
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", [](
|
2019-02-19 18:41:18 +00:00
|
|
|
WriteBuffer & buf,
|
|
|
|
const Block & sample,
|
2020-10-06 12:47:52 +00:00
|
|
|
const RowOutputFormatParams &,
|
2019-02-19 18:41:18 +00:00
|
|
|
const FormatSettings &)
|
|
|
|
{
|
|
|
|
return std::make_shared<NullOutputFormat>(sample, buf);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|