blob: c6a2a57c657cb5d7bec04c6034212d5903e28274 (
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
33
34
35
|
#pragma once
#include <Processors/IProcessor.h>
namespace DB
{
/** Has one input and arbitrary non zero number of outputs.
* All of them have the same structure.
*
* Pulls data input and copies it to every output.
* You may have heard about it under the name 'tee'.
*
* Doesn't do any heavy calculations.
* Preserves an order of data.
*/
class ForkProcessor final : public IProcessor
{
public:
ForkProcessor(const Block & header, size_t num_outputs)
: IProcessor(InputPorts{header}, OutputPorts(num_outputs, header))
{
}
String getName() const override { return "Fork"; }
Status prepare() override;
InputPort & getInputPort() { return inputs.front(); }
};
}
|