mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Added "reserve" for "arrayFirst" #3920
This commit is contained in:
parent
224e688e9c
commit
ed07c1a1d2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user