aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Processors/Sinks/NullSink.h
blob: c63ef1a88b1e52fc47bc0525ca72adac13eabbd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include <Processors/ISink.h>

namespace DB
{

/// Sink which closes input port and reads nothing.
class NullSink : public ISink
{
public:
    explicit NullSink(Block header) : ISink(std::move(header)) {}
    String getName() const override { return "NullSink"; }

    Status prepare() override
    {
        input.close();
        return Status::Finished;
    }
protected:
    void consume(Chunk) override {}
};

}