Respect alignment in groupArray function [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-09-02 22:53:35 +03:00
parent 198dd78100
commit c6275dd8e4

View File

@ -155,7 +155,7 @@ struct GroupArrayListNodeBase
/// Clones existing node (does not modify next field)
Node * clone(Arena * arena)
{
return reinterpret_cast<Node *>(const_cast<char *>(arena->insert(reinterpret_cast<char *>(this), sizeof(Node) + size)));
return reinterpret_cast<Node *>(const_cast<char *>(arena->alignedInsert(reinterpret_cast<char *>(this), sizeof(Node) + size, alignof(Node))));
}
/// Write node to buffer