aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Processors/ConcatProcessor.h
blob: 506317eba5d6bad77757f5d59eb920a9ed8b40b6 (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
24
25
26
27
28
29
30
31
32
#pragma once

#include <Processors/IProcessor.h>


namespace DB
{

/** Has arbitrary 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 final : public IProcessor
{
public:
    ConcatProcessor(const Block & header, size_t num_inputs);

    String getName() const override { return "Concat"; }

    Status prepare() override;

    OutputPort & getOutputPort() { return outputs.front(); }

private:
    InputPorts::iterator current_input;
};

}