mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Add QueryStatus to BuildQueryPipelineSettings and use it
This commit is contained in:
parent
9fe648ef8e
commit
edf4095139
@ -6,16 +6,12 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
BuildQueryPipelineSettings BuildQueryPipelineSettings::fromSettings(const Settings & from)
|
||||
BuildQueryPipelineSettings BuildQueryPipelineSettings::fromContext(ContextPtr from)
|
||||
{
|
||||
BuildQueryPipelineSettings settings;
|
||||
settings.actions_settings = ExpressionActionsSettings::fromSettings(from, CompileExpressions::yes);
|
||||
settings.actions_settings = ExpressionActionsSettings::fromSettings(from->getSettingsRef(), CompileExpressions::yes);
|
||||
settings.process_list_element = from->getProcessListElement();
|
||||
return settings;
|
||||
}
|
||||
|
||||
BuildQueryPipelineSettings BuildQueryPipelineSettings::fromContext(ContextPtr from)
|
||||
{
|
||||
return fromSettings(from->getSettingsRef());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ namespace DB
|
||||
{
|
||||
|
||||
struct Settings;
|
||||
class QueryStatus;
|
||||
|
||||
struct BuildQueryPipelineSettings
|
||||
{
|
||||
ExpressionActionsSettings actions_settings;
|
||||
QueryStatus * process_list_element = nullptr;
|
||||
|
||||
const ExpressionActionsSettings & getActionsSettings() const { return actions_settings; }
|
||||
|
||||
static BuildQueryPipelineSettings fromSettings(const Settings & from);
|
||||
static BuildQueryPipelineSettings fromContext(ContextPtr from);
|
||||
};
|
||||
|
||||
|
@ -180,6 +180,8 @@ QueryPipelineBuilderPtr QueryPlan::buildQueryPipeline(
|
||||
for (auto & context : interpreter_context)
|
||||
last_pipeline->addInterpreterContext(std::move(context));
|
||||
|
||||
last_pipeline->setProcessListElement(build_pipeline_settings.process_list_element);
|
||||
|
||||
return last_pipeline;
|
||||
}
|
||||
|
||||
|
@ -560,6 +560,7 @@ QueryPipeline QueryPipelineBuilder::getPipeline(QueryPipelineBuilder builder)
|
||||
{
|
||||
QueryPipeline res(std::move(builder.pipe));
|
||||
res.setNumThreads(builder.getNumThreads());
|
||||
res.setProcessListElement(builder.process_list_element);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user