Skip to content

Commit

Permalink
fix resize
Browse files Browse the repository at this point in the history
  • Loading branch information
amorynan committed Oct 11, 2024
1 parent 66967cb commit 45d6b44
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 0 deletions.
2 changes: 2 additions & 0 deletions be/src/vec/columns/column_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ void ColumnArray::reserve(size_t n) {
void ColumnArray::resize(size_t n) {
auto last_off = get_offsets().back();
get_offsets().resize_fill(n, last_off);
// make new size of data column
get_data().resize(get_offsets().back());
}

size_t ColumnArray::byte_size() const {
Expand Down
3 changes: 3 additions & 0 deletions be/src/vec/columns/column_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ void ColumnMap::reserve(size_t n) {
void ColumnMap::resize(size_t n) {
auto last_off = get_offsets().back();
get_offsets().resize_fill(n, last_off);
// make new size of data column
get_keys().resize(get_offsets().back());
get_values().resize(get_offsets().back());
}

size_t ColumnMap::byte_size() const {
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 45d6b44

Please sign in to comment.