| 768 | } |
| 769 | |
| 770 | void 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 | |
| 787 | std::unique_ptr<ReadProgressCallback> QueryPipeline::getReadProgressCallback() const |
| 788 | { |
no test coverage detected