mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 20:12:02 +00:00
fixup
This commit is contained in:
parent
fa9399d826
commit
4e668a5b06
@ -199,12 +199,15 @@ static String getUniqueName(const Block & block, const String & prefix)
|
||||
{
|
||||
auto result = prefix;
|
||||
|
||||
if (block.has(prefix))
|
||||
if (block.has(result))
|
||||
{
|
||||
int i = 1;
|
||||
while (block.has(prefix + toString(i)))
|
||||
do
|
||||
{
|
||||
result = prefix + "_" + toString(i);
|
||||
++i;
|
||||
result = prefix + "_" + toString(i);
|
||||
}
|
||||
while (block.has(result));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user