Added "reserve" for "arrayFirst" #3920

This commit is contained in:
Alexey Milovidov 2019-01-08 18:30:04 +03:00
parent 224e688e9c
commit ed07c1a1d2

View File

@ -34,6 +34,7 @@ struct ArrayFirstImpl
const auto & offsets = array.getOffsets();
const auto & data = array.getData();
auto out = data.cloneEmpty();
out->reserve(data.size());
size_t pos{};
for (size_t i = 0; i < offsets.size(); ++i)
@ -60,6 +61,7 @@ struct ArrayFirstImpl
const auto & offsets = array.getOffsets();
const auto & data = array.getData();
auto out = data.cloneEmpty();
out->reserve(data.size());
size_t pos{};
for (size_t i = 0; i < offsets.size(); ++i)