We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e57e463 commit b7f654cCopy full SHA for b7f654c
clickhouse/columns/lowcardinality.cpp
@@ -180,7 +180,7 @@ void ColumnLowCardinality::Reserve(size_t new_cap) {
180
// NOTE(vnemkov): Formula below (`ceil(sqrt(x))`) is a gut-feeling-good-enough estimation,
181
// feel free to replace/adjust if you have better one suported by actual data.
182
dictionary_column_->Reserve(static_cast<size_t>(ceil(sqrt(new_cap))));
183
- index_column_->Reserve(new_cap);
+ index_column_->Reserve(new_cap + 2); // + 1 for null item (at pos 0), + 1 for default item (at pos 1)
184
}
185
186
void ColumnLowCardinality::Setup(ColumnRef dictionary_column) {
0 commit comments