2022-04-01 13:12:54 +00:00
|
|
|
#include <IO/WriteHelpers.h>
|
|
|
|
#include <Common/NamePrompter.h>
|
|
|
|
|
2022-11-07 12:51:19 +00:00
|
|
|
namespace DB
|
2022-04-01 13:12:54 +00:00
|
|
|
{
|
2022-11-07 12:51:19 +00:00
|
|
|
|
2022-11-08 18:36:43 +00:00
|
|
|
String getHintsErrorMessageSuffix(const std::vector<String> & hints)
|
2022-04-01 13:12:54 +00:00
|
|
|
{
|
|
|
|
if (hints.empty())
|
2022-11-08 18:36:43 +00:00
|
|
|
return {};
|
|
|
|
|
|
|
|
return ". Maybe you meant: " + toString(hints);
|
|
|
|
}
|
2022-04-01 13:12:54 +00:00
|
|
|
|
2022-11-08 18:36:43 +00:00
|
|
|
void appendHintsMessage(String & message, const std::vector<String> & hints)
|
|
|
|
{
|
|
|
|
message += getHintsErrorMessageSuffix(hints);
|
2022-04-01 13:12:54 +00:00
|
|
|
}
|
2022-11-07 12:51:19 +00:00
|
|
|
|
2022-04-01 13:12:54 +00:00
|
|
|
}
|