Fix clang readability-container-size-empty warning in StorageDistributed::canForceGroupByNoMerge()

This commit is contained in:
Azat Khuzhin 2020-04-20 01:11:36 +03:00
parent be1dec9239
commit e44d5c5749

View File

@ -430,7 +430,7 @@ bool StorageDistributed::canForceGroupByNoMerge(const Context &context, QueryPro
// injective functions are optimized out in optimizeGroupBy() // injective functions are optimized out in optimizeGroupBy()
// hence all we need to check is that column in GROUP BY matches sharding expression // hence all we need to check is that column in GROUP BY matches sharding expression
auto & group_exprs = group_by->children; auto & group_exprs = group_by->children;
if (!group_exprs.size()) if (group_exprs.empty())
throw Exception("No ASTExpressionList in GROUP BY", ErrorCodes::LOGICAL_ERROR); throw Exception("No ASTExpressionList in GROUP BY", ErrorCodes::LOGICAL_ERROR);
auto id = group_exprs[0]->as<ASTIdentifier>(); auto id = group_exprs[0]->as<ASTIdentifier>();