From 3cce851f187c91ea7aa39f47833adcdd547c0112 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 22 Jan 2021 12:35:15 +0300 Subject: [PATCH] Use pulling executor in GlobalSubqueriesMatcher --- src/Interpreters/GlobalSubqueriesVisitor.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Interpreters/GlobalSubqueriesVisitor.h b/src/Interpreters/GlobalSubqueriesVisitor.h index e87ee6349f3..6b76f5b2822 100644 --- a/src/Interpreters/GlobalSubqueriesVisitor.h +++ b/src/Interpreters/GlobalSubqueriesVisitor.h @@ -17,6 +17,7 @@ #include #include #include +#include namespace DB { @@ -140,16 +141,15 @@ public: { auto external_table = external_storage_holder->getTable(); auto table_out = external_table->write({}, external_table->getInMemoryMetadataPtr(), context); - auto stream = interpreter->execute().getInputStream(); + auto io = interpreter->execute(); + PullingPipelineExecutor executor(io.pipeline); table_out->writePrefix(); - stream->readPrefix(); - while (Block block = stream->read()) - { + Block block; + while (!executor.pull(block)) table_out->write(block); - } + table_out->writeSuffix(); - stream->readSuffix(); } else {