diff --git a/dbms/src/Processors/QueryPipeline.cpp b/dbms/src/Processors/QueryPipeline.cpp index c4fcbf536be..a4caadd679d 100644 --- a/dbms/src/Processors/QueryPipeline.cpp +++ b/dbms/src/Processors/QueryPipeline.cpp @@ -137,10 +137,14 @@ void QueryPipeline::addSimpleTransformImpl(const TProcessorGetter & getter) auto & out_header = transform ? transform->getOutputs().front().getHeader() : stream->getHeader(); - if (header) - assertBlocksHaveEqualStructure(header, out_header, "QueryPipeline"); - else - header = out_header; + + if (stream_type != StreamType::Totals) + { + if (header) + assertBlocksHaveEqualStructure(header, out_header, "QueryPipeline"); + else + header = out_header; + } if (transform) {