Skip to content

Commit 51c62ce

Browse files
authored
Merge pull request #248 from 1261385937/bugfix
bugfix, remove items_.reserve for batch write
2 parents d866526 + 69062c9 commit 51c62ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clickhouse/columns/string.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ void ColumnString::Append(ColumnRef column) {
247247
// TODO: fill up existing block with some items and then add a new one for the rest of items
248248
if (blocks_.size() == 0 || blocks_.back().GetAvailable() < total_size)
249249
blocks_.emplace_back(std::max(DEFAULT_BLOCK_SIZE, total_size));
250-
items_.reserve(items_.size() + col->Size());
251250

251+
// Intentionally not doing items_.reserve() since that cripples performance.
252252
for (size_t i = 0; i < column->Size(); ++i) {
253253
this->AppendUnsafe((*col)[i]);
254254
}

0 commit comments

Comments
 (0)