2018-05-24 01:02:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Processors/IProcessor.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2020-08-08 00:47:03 +00:00
|
|
|
/** Has arbitrary non zero number of inputs and one output.
|
2018-05-24 01:02:16 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
2023-02-02 15:47:00 +00:00
|
|
|
class ConcatProcessor final : public IProcessor
|
2018-05-24 01:02:16 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-06-04 22:11:48 +00:00
|
|
|
ConcatProcessor(const Block & header, size_t num_inputs);
|
2018-05-24 01:02:16 +00:00
|
|
|
|
|
|
|
String getName() const override { return "Concat"; }
|
|
|
|
|
|
|
|
Status prepare() override;
|
|
|
|
|
2019-02-27 11:24:14 +00:00
|
|
|
OutputPort & getOutputPort() { return outputs.front(); }
|
2018-05-24 02:39:22 +00:00
|
|
|
|
2018-05-24 01:02:16 +00:00
|
|
|
private:
|
|
|
|
InputPorts::iterator current_input;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|