mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Use original_query for projection analysis
This commit is contained in:
parent
240895fba7
commit
2f615e9176
@ -272,6 +272,7 @@ InterpreterSelectQuery::InterpreterSelectQuery(
|
||||
|
||||
query_info.ignore_projections = options.ignore_projections;
|
||||
query_info.is_projection_query = options.is_projection_query;
|
||||
query_info.original_query = query_ptr->clone();
|
||||
|
||||
initSettings();
|
||||
const Settings & settings = context->getSettingsRef();
|
||||
|
@ -4531,7 +4531,7 @@ bool MergeTreeData::getQueryProcessingStageWithAggregateProjection(
|
||||
if (!settings.allow_experimental_projection_optimization || query_info.ignore_projections || query_info.is_projection_query)
|
||||
return false;
|
||||
|
||||
const auto & query_ptr = query_info.query;
|
||||
const auto & query_ptr = query_info.original_query;
|
||||
|
||||
if (auto * select = query_ptr->as<ASTSelectQuery>(); select)
|
||||
{
|
||||
|
@ -133,6 +133,7 @@ struct SelectQueryInfo
|
||||
{
|
||||
ASTPtr query;
|
||||
ASTPtr view_query; /// Optimized VIEW query
|
||||
ASTPtr original_query; /// Unmodified query for projection analysis
|
||||
|
||||
/// Cluster for the query.
|
||||
ClusterPtr cluster;
|
||||
|
Loading…
Reference in New Issue
Block a user