Merge pull request #19487 from ucasFL/ms

remove part of misleading exception message
This commit is contained in:
alexey-milovidov 2021-01-28 12:01:24 +03:00 committed by GitHub
commit 045a8e8a0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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