ClickHouse/src/Processors/Formats/Impl/NullFormat.cpp

32 lines
702 B
C++
Raw Normal View History

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 {}
};
void registerOutputFormatProcessorNull(FormatFactory & factory)
{
factory.registerOutputFormatProcessor("Null", [](
WriteBuffer & buf,
const Block & sample,
const RowOutputFormatParams &,
2019-02-19 18:41:18 +00:00
const FormatSettings &)
{
return std::make_shared<NullOutputFormat>(sample, buf);
});
}
}