ClickHouse/dbms/Processors/ConcatProcessor.h
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

36 lines
763 B
C++

#pragma once
#include <Processors/IProcessor.h>
namespace DB
{
/** Has arbitary non zero number of inputs and one output.
* All of them have the same structure.
*
* Pulls all data from first input, then all data from second input, etc...
* Doesn't do any heavy calculations.
* Preserves an order of data.
*/
class ConcatProcessor : public IProcessor
{
public:
ConcatProcessor(const Block & header, size_t num_inputs)
: IProcessor(InputPorts(num_inputs, header), OutputPorts{header}), current_input(inputs.begin())
{
}
String getName() const override { return "Concat"; }
Status prepare() override;
OutputPort & getOutputPort() { return outputs.front(); }
private:
InputPorts::iterator current_input;
};
}