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 b7f654c commit 8b9ecf8Copy full SHA for 8b9ecf8
clickhouse/columns/lowcardinality.cpp
@@ -179,7 +179,7 @@ void ColumnLowCardinality::Reserve(size_t new_cap) {
179
// Assumption is that dictionary must be smaller than index.
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))));
+ dictionary_column_->Reserve(static_cast<size_t>(ceil(sqrt(static_cast<double>(new_cap)))));
183
index_column_->Reserve(new_cap + 2); // + 1 for null item (at pos 0), + 1 for default item (at pos 1)
184
}
185
0 commit comments