Try to enable normal projections.

This commit is contained in:
Nikolai Kochetov 2021-04-22 20:07:53 +03:00 committed by Amos Bird
parent 483bd165e7
commit 95431168c2
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
3 changed files with 5 additions and 3 deletions

View File

@ -134,6 +134,8 @@ ASTPtr ASTProjectionSelectQuery::cloneToASTSelect() const
if (groupBy())
select_query->setExpression(ASTSelectQuery::Expression::GROUP_BY, groupBy()->clone());
// Get rid of orderBy. It's used for projection definition only
if (orderBy())
select_query->setExpression(ASTSelectQuery::Expression::ORDER_BY, orderBy()->clone());
return node;
}

View File

@ -313,7 +313,7 @@ QueryPlanPtr MergeTreeDataSelectExecutor::read(
}
}
if (processed_stage >= QueryProcessingStage::WithMergeableState)
if (query_info.aggregate_projection->type == "aggregate")
{
/// Here we create shared ManyAggregatedData for both projection and ordinary data.
/// For ordinary data, AggregatedData is filled in a usual way.

View File

@ -104,8 +104,8 @@ ProjectionDescription::getProjectionFromAST(const ASTPtr & definition_ast, const
if (!projection_definition->query)
throw Exception("QUERY is required for projection", ErrorCodes::INCORRECT_QUERY);
if (projection_definition->type == "normal")
throw Exception("Normal projections are not supported for now", ErrorCodes::NOT_IMPLEMENTED);
// if (projection_definition->type == "normal")
// throw Exception("Normal projections are not supported for now", ErrorCodes::NOT_IMPLEMENTED);
ProjectionDescription result;
result.definition_ast = projection_definition->clone();