You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read the code of clickhouse-rs and found that after setting the capacity in Block::with_capacity, the later code does not use it. Shouldn't this be changed here?
/// Constructs a new, empty `Block` with the specified capacity.
pub fn with_capacity(capacity: usize) -> Self {
Self {
info: Default::default(),
columns: Vec::with_capacity(capacity),
capacity
}
}
The text was updated successfully, but these errors were encountered:
The size field stores the estimated number of rows, not columns. This is reasonable because, in practice, the number of rows in blocks is usually much larger than the number of columns, and reducing unnecessary allocations when adding rows can significantly improve performance. These are the places where this field is used:
I read the code of clickhouse-rs and found that after setting the capacity in Block::with_capacity, the later code does not use it. Shouldn't this be changed here?
The text was updated successfully, but these errors were encountered: