Merge pull request #19801 from ucasFL/ms

continue of #19487
This commit is contained in:
alexey-milovidov 2021-02-25 19:12:47 +03:00 committed by GitHub
commit 0067a3beac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -715,18 +715,17 @@ void TreeRewriterResult::collectUsedColumns(const ASTPtr & query, bool is_select
if (storage)
{
String hint_name{};
std::vector<String> hint_name{};
for (const auto & name : columns_context.requiredColumns())
{
auto hints = storage->getHints(name);
if (!hints.empty())
hint_name = hint_name + " '" + toString(hints) + "'";
hint_name.insert(hint_name.end(), hints.begin(), hints.end());
}
if (!hint_name.empty())
{
ss << ", maybe you meant: ";
ss << hint_name;
ss << toString(hint_name);
}
}
else