| 364 | } |
| 365 | |
| 366 | void Pipe::addTotalsSource(ProcessorPtr source) |
| 367 | { |
| 368 | if (output_ports.empty()) |
| 369 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot add totals source to empty Pipe"); |
| 370 | |
| 371 | if (totals_port) |
| 372 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Totals source was already added to Pipe"); |
| 373 | |
| 374 | checkSource(*source); |
| 375 | const auto & source_header = output_ports.front()->getSharedHeader(); |
| 376 | |
| 377 | assertBlocksHaveEqualStructure(*header, *source_header, "Pipes"); |
| 378 | |
| 379 | if (collected_processors) |
| 380 | collected_processors->emplace_back(source); |
| 381 | |
| 382 | totals_port = &source->getOutputs().front(); |
| 383 | processors->emplace_back(std::move(source)); |
| 384 | } |
| 385 | |
| 386 | void Pipe::addExtremesSource(ProcessorPtr source) |
| 387 | { |
no test coverage detected