From ad8af5b5baef04c22e45415b1bde8e35e92c2619 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Tue, 30 Apr 2019 20:12:43 +0300 Subject: [PATCH] Do not create processors for totals stream. --- dbms/src/Processors/QueryPipeline.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) {