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

Method convertStructureTo

src/QueryPipeline/QueryPipeline.cpp:770–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768}
769
770void QueryPipeline::convertStructureTo(const ColumnsWithTypeAndName & columns, const ContextPtr & context)
771{
772 if (!pulling())
773 throw Exception(ErrorCodes::LOGICAL_ERROR, "Pipeline must be pulling to convert header");
774
775 auto converting = ActionsDAG::makeConvertingActions(
776 output->getHeader().getColumnsWithTypeAndName(),
777 columns,
778 ActionsDAG::MatchColumnsMode::Position,
779 context);
780
781 auto actions = std::make_shared<ExpressionActions>(std::move(converting));
782 addExpression(output, actions, *processors);
783 addExpression(totals, actions, *processors);
784 addExpression(extremes, actions, *processors);
785}
786
787std::unique_ptr<ReadProgressCallback> QueryPipeline::getReadProgressCallback() const
788{

Callers 1

createStreamForQueryMethod · 0.80

Calls 3

addExpressionFunction · 0.85
ExceptionClass · 0.50
getHeaderMethod · 0.45

Tested by

no test coverage detected