1 | #include <Processors/Formats/IOutputFormat.h> |
---|---|
2 | #include <Formats/FormatFactory.h> |
3 | |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | class NullOutputFormat : public IOutputFormat |
9 | { |
10 | public: |
11 | NullOutputFormat(const Block & header, WriteBuffer & out_) : IOutputFormat(header, out_) {} |
12 | |
13 | String getName() const override { return "NullOutputFormat"; } |
14 | |
15 | protected: |
16 | void consume(Chunk) override {} |
17 | }; |
18 | |
19 | void registerOutputFormatProcessorNull(FormatFactory & factory) |
20 | { |
21 | factory.registerOutputFormatProcessor("Null", []( |
22 | WriteBuffer & buf, |
23 | const Block & sample, |
24 | FormatFactory::WriteCallback, |
25 | const FormatSettings &) |
26 | { |
27 | return std::make_shared<NullOutputFormat>(sample, buf); |
28 | }); |
29 | } |
30 | |
31 | } |
32 |