1 | #include <iostream> |
---|---|
2 | #include <Processors/IProcessor.h> |
3 | |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | void IProcessor::dump() const |
9 | { |
10 | std::cerr << getName() << "\n"; |
11 | |
12 | std::cerr << "inputs:\n"; |
13 | for (const auto & port : inputs) |
14 | std::cerr << "\t"<< port.hasData() << " "<< port.isFinished() << "\n"; |
15 | |
16 | std::cerr << "outputs:\n"; |
17 | for (const auto & port : outputs) |
18 | std::cerr << "\t"<< port.hasData() << " "<< port.isNeeded() << "\n"; |
19 | } |
20 | |
21 | |
22 | std::string IProcessor::statusToName(Status status) |
23 | { |
24 | switch (status) |
25 | { |
26 | case Status::NeedData: |
27 | return "NeedData"; |
28 | case Status::PortFull: |
29 | return "PortFull"; |
30 | case Status::Finished: |
31 | return "Finished"; |
32 | case Status::Ready: |
33 | return "Ready"; |
34 | case Status::Async: |
35 | return "Async"; |
36 | case Status::Wait: |
37 | return "Wait"; |
38 | case Status::ExpandPipeline: |
39 | return "ExpandPipeline"; |
40 | } |
41 | |
42 | __builtin_unreachable(); |
43 | } |
44 | |
45 | } |
46 | |
47 |