From 7fb45461d174c3ae122c9d11ba5a4414fe0d3fd6 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 10 Sep 2020 10:36:29 +0300 Subject: [PATCH] Try fix totals port for IAccumulatingTransform. --- src/Processors/IAccumulatingTransform.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Processors/IAccumulatingTransform.cpp b/src/Processors/IAccumulatingTransform.cpp index 2905d185df2..64bdbe2410f 100644 --- a/src/Processors/IAccumulatingTransform.cpp +++ b/src/Processors/IAccumulatingTransform.cpp @@ -49,13 +49,15 @@ IAccumulatingTransform::Status IAccumulatingTransform::prepare() return Status::Finished; } - /// Close input if flag was set manually. + if (input.isFinished()) + finished_input = true; + if (finished_input) + { + /// Close input if flag was set manually. input.close(); - /// Read from totals port if has it. - if (input.isFinished()) - { + /// Read from totals port if has it. if (inputs.size() > 1) { auto & totals_input = inputs.back(); @@ -69,12 +71,8 @@ IAccumulatingTransform::Status IAccumulatingTransform::prepare() totals_input.close(); } } - } - /// Generate output block. - if (input.isFinished()) - { - finished_input = true; + /// Generate output block. return Status::Ready; }