MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / addExtremesSource

Method addExtremesSource

src/QueryPipeline/Pipe.cpp:386–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386void Pipe::addExtremesSource(ProcessorPtr source)
387{
388 if (output_ports.empty())
389 throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot add extremes source to empty Pipe");
390
391 if (extremes_port)
392 throw Exception(ErrorCodes::LOGICAL_ERROR, "Extremes source was already added to Pipe");
393
394 checkSource(*source);
395 const auto & source_header = output_ports.front()->getSharedHeader();
396
397 assertBlocksHaveEqualStructure(*header, *source_header, "Pipes");
398
399 if (collected_processors)
400 collected_processors->emplace_back(source);
401
402 extremes_port = &source->getOutputs().front();
403 processors->emplace_back(std::move(source));
404}
405
406static void dropPort(OutputPort *& port, Processors & processors, Processors * collected_processors)
407{

Callers 2

createRemoteSourcePipeFunction · 0.80

Calls 7

checkSourceFunction · 0.85
getSharedHeaderMethod · 0.80
ExceptionClass · 0.50
emptyMethod · 0.45
frontMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected