ClickHouse/dbms/Processors/NullSink.h

23 lines
414 B
C++
Raw Normal View History

2019-03-26 18:28:37 +00:00
#pragma once
2019-07-07 14:57:50 +00:00
#include <Processors/IProcessor.h>
2019-03-26 18:28:37 +00:00
namespace DB
{
2019-07-07 14:57:50 +00:00
class NullSink : public IProcessor
2019-03-26 18:28:37 +00:00
{
public:
2019-07-07 14:57:50 +00:00
explicit NullSink(Block header) : IProcessor({std::move(header)}, {}) {}
2019-03-26 18:28:37 +00:00
String getName() const override { return "NullSink"; }
2019-07-07 14:57:50 +00:00
Status prepare() override
{
inputs.front().close();
return Status::Finished;
}
InputPort & getPort() { return inputs.front(); }
2019-03-26 18:28:37 +00:00
};
}