mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Update building sets.
This commit is contained in:
parent
e2a2ab6f67
commit
871ac3eeb7
@ -53,6 +53,8 @@
|
||||
#include <IO/Operators.h>
|
||||
#include <IO/WriteBufferFromString.h>
|
||||
|
||||
#include <Processors/Executors/PullingPipelineExecutor.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
@ -318,13 +320,14 @@ void SelectQueryExpressionAnalyzer::tryMakeSetForIndexFromSubquery(const ASTPtr
|
||||
}
|
||||
|
||||
auto interpreter_subquery = interpretSubquery(subquery_or_table_name, context, {}, query_options);
|
||||
auto stream = interpreter_subquery->execute().getInputStream();
|
||||
auto io = interpreter_subquery->execute();
|
||||
PullingPipelineExecutor executor(io.pipeline);
|
||||
|
||||
SetPtr set = std::make_shared<Set>(settings.size_limits_for_set, true, context.getSettingsRef().transform_null_in);
|
||||
set->setHeader(stream->getHeader());
|
||||
set->setHeader(executor.getHeader());
|
||||
|
||||
stream->readPrefix();
|
||||
while (Block block = stream->read())
|
||||
Block block;
|
||||
while (executor.pull(block))
|
||||
{
|
||||
/// If the limits have been exceeded, give up and let the default subquery processing actions take place.
|
||||
if (!set->insertFromBlock(block))
|
||||
@ -332,7 +335,6 @@ void SelectQueryExpressionAnalyzer::tryMakeSetForIndexFromSubquery(const ASTPtr
|
||||
}
|
||||
|
||||
set->finishInsert();
|
||||
stream->readSuffix();
|
||||
|
||||
prepared_sets[set_key] = std::move(set);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user