tidy build suggestions

This commit is contained in:
Yakov Olkhovskiy 2022-06-04 17:24:48 -04:00
parent adf305e1dd
commit 07009c27c2

View File

@ -891,11 +891,11 @@ static SortDescription getSortDescription(const ASTSelectQuery & query, const Bl
collator = std::make_shared<Collator>(order_by_elem.collation->as<ASTLiteral &>().value.get<String>()); collator = std::make_shared<Collator>(order_by_elem.collation->as<ASTLiteral &>().value.get<String>());
if (order_by_elem.with_fill) if (order_by_elem.with_fill)
{ {
auto column = result_block.findByName(name); const auto *column = result_block.findByName(name);
if (!column) if (!column)
column = source_block.findByName(name); column = source_block.findByName(name);
if (!column) if (!column)
for (auto &[alias, ast] : aliases) for (const auto &[alias, ast] : aliases)
if (name == ast->getColumnName()) if (name == ast->getColumnName())
if ((column = result_block.findByName(alias))) if ((column = result_block.findByName(alias)))
break; break;