From a9709f846eb4f9d2f2cca4bb22a8e7e2b34d50d9 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 8 Apr 2019 15:24:49 +0300 Subject: [PATCH] Fix TotalsHavingTransform. --- dbms/src/Processors/Transforms/TotalsHavingTransform.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbms/src/Processors/Transforms/TotalsHavingTransform.cpp b/dbms/src/Processors/Transforms/TotalsHavingTransform.cpp index ecb4c3fc41f..9f3822481c7 100644 --- a/dbms/src/Processors/Transforms/TotalsHavingTransform.cpp +++ b/dbms/src/Processors/Transforms/TotalsHavingTransform.cpp @@ -25,10 +25,11 @@ static Chunk finalizeChunk(Chunk chunk) static Block createOutputHeader(Block block, const ExpressionActionsPtr & expression) { + finalizeBlock(block); + if (expression) expression->execute(block); - finalizeBlock(block); return block; }