mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-28 12:40:49 +00:00
Update ActionsVisitor.cpp
This commit is contained in:
parent
0f92f60ab2
commit
56141a1e6b
@ -509,10 +509,10 @@ void ActionsMatcher::visit(const ASTIdentifier & identifier, const ASTPtr & ast,
|
||||
{
|
||||
/// The requested column is not in the block.
|
||||
/// If such a column exists in the table, then the user probably forgot to surround it with an aggregate function or add it to GROUP BY.
|
||||
|
||||
for (const auto & column_name_type : data.source_columns)
|
||||
|
||||
for (const auto & column_name_type : data.source_columns)
|
||||
{
|
||||
if (column_name_type.name == column_name.get(ast))
|
||||
if (column_name_type.name == column_name.get(ast))
|
||||
{
|
||||
throw Exception("Column " + backQuote(column_name.get(ast)) + " is not under aggregate function and not in GROUP BY",
|
||||
ErrorCodes::NOT_AN_AGGREGATE);
|
||||
|
Loading…
Reference in New Issue
Block a user