mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Fix segfault and add tabs to ton of tests (desc table)
This commit is contained in:
parent
c91687f9d7
commit
1228645a79
@ -291,11 +291,12 @@ static ColumnsDeclarationAndModifiers parseColumns(const ASTExpressionList & col
|
||||
auto new_columns = Nested::flattenWithMapping(columns, mapping);
|
||||
for (const auto & [old_name, new_names] : mapping)
|
||||
{
|
||||
if (new_names.size() == 1 && old_name == new_names.back())
|
||||
auto codec_it = codecs.find(old_name);
|
||||
if ((new_names.size() == 1 && old_name == new_names.back()) || codec_it == codecs.end())
|
||||
continue;
|
||||
|
||||
auto codec = codecs[old_name];
|
||||
codecs.erase(old_name);
|
||||
auto codec = codec_it->second;
|
||||
codecs.erase(codec_it);
|
||||
for (const auto & new_name : new_names)
|
||||
codecs.emplace(new_name, codec);
|
||||
}
|
||||
|
@ -214,17 +214,18 @@ void parseColumn(ReadBufferFromString & buf, ColumnsDescription & result, const
|
||||
result.defaults.emplace(column_name, std::move(*column_default));
|
||||
}
|
||||
|
||||
auto comment = parseComment(buf);
|
||||
if (!comment.empty())
|
||||
{
|
||||
result.comments.emplace(column_name, std::move(comment));
|
||||
}
|
||||
|
||||
auto codec = parseCodec(buf);
|
||||
if (codec)
|
||||
{
|
||||
result.codecs.emplace(column_name, std::move(codec));
|
||||
}
|
||||
|
||||
auto comment = parseComment(buf);
|
||||
if (!comment.empty())
|
||||
{
|
||||
result.comments.emplace(column_name, std::move(comment));
|
||||
}
|
||||
|
||||
assertChar('\n', buf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user