mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fixed bad code #3565
This commit is contained in:
parent
ead153e9e4
commit
d1b86225ef
@ -449,11 +449,10 @@ template <>
|
|||||||
void FlatDictionary::createAttributeImpl<String>(Attribute & attribute, const Field & null_value)
|
void FlatDictionary::createAttributeImpl<String>(Attribute & attribute, const Field & null_value)
|
||||||
{
|
{
|
||||||
attribute.string_arena = std::make_unique<Arena>();
|
attribute.string_arena = std::make_unique<Arena>();
|
||||||
auto & null_value_ref = std::get<StringRef>(attribute.null_values);
|
|
||||||
const String & string = null_value.get<String>();
|
const String & string = null_value.get<String>();
|
||||||
const auto string_in_arena = attribute.string_arena->insert(string.data(), string.size());
|
const char * string_in_arena = attribute.string_arena->insert(string.data(), string.size());
|
||||||
null_value_ref = StringRef{string_in_arena, string.size()};
|
attribute.null_values.emplace<StringRef>(string_in_arena, string.size());
|
||||||
attribute.arrays.emplace<ContainerType<StringRef>>(initial_array_size, null_value_ref);
|
attribute.arrays.emplace<ContainerType<StringRef>>(initial_array_size, StringRef(string_in_arena, string.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user