| 44 | } |
| 45 | |
| 46 | static void checkSource(const IProcessor & source) |
| 47 | { |
| 48 | if (!source.getInputs().empty()) |
| 49 | throw Exception("Source for pipe shouldn't have any input, but " + source.getName() + " has " + |
| 50 | toString(source.getInputs().size()) + " inputs.", ErrorCodes::LOGICAL_ERROR); |
| 51 | |
| 52 | if (source.getOutputs().empty()) |
| 53 | throw Exception("Source for pipe should have single output, but it doesn't have any", |
| 54 | ErrorCodes::LOGICAL_ERROR); |
| 55 | |
| 56 | if (source.getOutputs().size() > 1) |
| 57 | throw Exception("Source for pipe should have single output, but " + source.getName() + " has " + |
| 58 | toString(source.getOutputs().size()) + " outputs.", ErrorCodes::LOGICAL_ERROR); |
| 59 | } |
| 60 | |
| 61 | static OutputPort * uniteExtremes(const OutputPortRawPtrs & ports, const Block & header, Processors & processors) |
| 62 | { |
no test coverage detected