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

Method addTotalsSource

src/QueryPipeline/Pipe.cpp:366–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366void 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
386void Pipe::addExtremesSource(ProcessorPtr source)
387{

Callers 3

createRemoteSourcePipeFunction · 0.80
addDefaultTotalsMethod · 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