mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Fix two more tests
This commit is contained in:
parent
2b7d056002
commit
833c0842a1
@ -331,7 +331,7 @@ void SelectQueryExpressionAnalyzer::tryMakeSetForIndexFromSubquery(const ASTPtr
|
|||||||
|
|
||||||
SetPtr SelectQueryExpressionAnalyzer::isPlainStorageSetInSubquery(const ASTPtr & subquery_or_table_name)
|
SetPtr SelectQueryExpressionAnalyzer::isPlainStorageSetInSubquery(const ASTPtr & subquery_or_table_name)
|
||||||
{
|
{
|
||||||
const auto * table = subquery_or_table_name->as<ASTIdentifier>();
|
const auto * table = subquery_or_table_name->as<ASTTableIdentifier>();
|
||||||
if (!table)
|
if (!table)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
auto table_id = context.resolveStorageID(subquery_or_table_name);
|
auto table_id = context.resolveStorageID(subquery_or_table_name);
|
||||||
|
@ -739,13 +739,13 @@ void TreeRewriter::normalize(ASTPtr & query, Aliases & aliases, const Settings &
|
|||||||
CustomizeAggregateFunctionsOrNullVisitor(data_or_null).visit(query);
|
CustomizeAggregateFunctionsOrNullVisitor(data_or_null).visit(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a dictionary `aliases`: alias -> ASTPtr
|
|
||||||
QueryAliasesVisitor(aliases).visit(query);
|
|
||||||
|
|
||||||
/// Mark table ASTIdentifiers with not a column marker
|
/// Mark table ASTIdentifiers with not a column marker
|
||||||
MarkTableIdentifiersVisitor::Data identifiers_data{aliases};
|
MarkTableIdentifiersVisitor::Data identifiers_data{aliases};
|
||||||
MarkTableIdentifiersVisitor(identifiers_data).visit(query);
|
MarkTableIdentifiersVisitor(identifiers_data).visit(query);
|
||||||
|
|
||||||
|
/// Creates a dictionary `aliases`: alias -> ASTPtr
|
||||||
|
QueryAliasesVisitor(aliases).visit(query);
|
||||||
|
|
||||||
/// Common subexpression elimination. Rewrite rules.
|
/// Common subexpression elimination. Rewrite rules.
|
||||||
QueryNormalizer::Data normalizer_data(aliases, settings);
|
QueryNormalizer::Data normalizer_data(aliases, settings);
|
||||||
QueryNormalizer(normalizer_data).visit(query);
|
QueryNormalizer(normalizer_data).visit(query);
|
||||||
|
Loading…
Reference in New Issue
Block a user