mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Store context created from projection analysis.
This commit is contained in:
parent
2892d447d4
commit
09325ff17e
@ -6118,6 +6118,7 @@ std::optional<ProjectionCandidate> MergeTreeData::getQueryProcessingStageWithAgg
|
|||||||
{
|
{
|
||||||
ProjectionCandidate candidate{};
|
ProjectionCandidate candidate{};
|
||||||
candidate.desc = &projection;
|
candidate.desc = &projection;
|
||||||
|
candidate.context = select.getContext();
|
||||||
|
|
||||||
auto sample_block = projection.sample_block;
|
auto sample_block = projection.sample_block;
|
||||||
auto sample_block_for_keys = projection.sample_block_for_keys;
|
auto sample_block_for_keys = projection.sample_block_for_keys;
|
||||||
|
@ -466,6 +466,7 @@ QueryPlanPtr MergeTreeDataSelectExecutor::read(
|
|||||||
fmt::format("MergeTree(with {} projection {})", query_info.projection->desc->type, query_info.projection->desc->name),
|
fmt::format("MergeTree(with {} projection {})", query_info.projection->desc->type, query_info.projection->desc->name),
|
||||||
query_info.storage_limits);
|
query_info.storage_limits);
|
||||||
plan->addStep(std::move(step));
|
plan->addStep(std::move(step));
|
||||||
|
plan->addInterpreterContext(query_info.projection->context);
|
||||||
return plan;
|
return plan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,6 +163,9 @@ struct ProjectionCandidate
|
|||||||
SortDescription group_by_elements_order_descr;
|
SortDescription group_by_elements_order_descr;
|
||||||
MergeTreeDataSelectAnalysisResultPtr merge_tree_projection_select_result_ptr;
|
MergeTreeDataSelectAnalysisResultPtr merge_tree_projection_select_result_ptr;
|
||||||
MergeTreeDataSelectAnalysisResultPtr merge_tree_normal_select_result_ptr;
|
MergeTreeDataSelectAnalysisResultPtr merge_tree_normal_select_result_ptr;
|
||||||
|
|
||||||
|
/// Becasue projection analysis uses a separate interpreter.
|
||||||
|
ContextPtr context;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Query along with some additional data,
|
/** Query along with some additional data,
|
||||||
|
Loading…
Reference in New Issue
Block a user