Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/milvus-io/milvus into 231…
Browse files Browse the repository at this point in the history
…2-import-executor
  • Loading branch information
bigsheeper committed Dec 23, 2023
2 parents c84c29e + 1b7f1d7 commit 17a131c
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions internal/core/src/mmap/Column.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,22 @@ class VariableColumn : public ColumnBase {
if (!indices.empty()) {
indices_ = std::move(indices);
}
num_rows_ = indices_.size();

size_t total_size = size_;
size_ = 0;
Expand(total_size);
// for variable length column in memory mode only
if (data_ == nullptr) {
num_rows_ = indices_.size();

while (!load_buf_.empty()) {
auto data = std::move(load_buf_.front());
load_buf_.pop();
size_t total_size = size_;
size_ = 0;
Expand(total_size);

std::copy_n(data.data(), data.length(), data_ + size_);
size_ += data.length();
while (!load_buf_.empty()) {
auto data = std::move(load_buf_.front());
load_buf_.pop();

std::copy_n(data.data(), data.length(), data_ + size_);
size_ += data.length();
}
}

ConstructViews();
Expand Down

0 comments on commit 17a131c

Please sign in to comment.