diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index b92518d6961f3ba2abcfa7b53a3f354aff0b5923..7dc61679c3813a0b670d3b2b05faa37494ca86b4 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -133,6 +133,7 @@ Status DBImpl::merge_files(const std::string& group_id, const meta::DateT& date, } else { group_file.file_type = meta::GroupFileSchema::RAW; } + group_file.rows = index_size; updated.push_back(group_file); status = _pMeta->update_files(updated); @@ -188,6 +189,7 @@ Status DBImpl::build_index(const meta::GroupFileSchema& file) { /* std::cout << "raw size=" << from_index->ntotal << " index size=" << index->ntotal << std::endl; */ write_index(index, group_file.location.c_str()); group_file.file_type = meta::GroupFileSchema::INDEX; + group_file.rows = file.dimension * index->ntotal; auto to_remove = file; to_remove.file_type = meta::GroupFileSchema::TO_DELETE; diff --git a/cpp/src/db/DBMetaImpl.cpp b/cpp/src/db/DBMetaImpl.cpp index 126a64c8af0a7643cf828ee4414a9b7aeddb74d3..3b0f520673edfde1e8b750fe8fa6549294f93880 100644 --- a/cpp/src/db/DBMetaImpl.cpp +++ b/cpp/src/db/DBMetaImpl.cpp @@ -165,6 +165,7 @@ Status DBMetaImpl::add_group_file(GroupFileSchema& group_file) { group_file.file_type = GroupFileSchema::NEW; group_file.file_id = ss.str(); group_file.dimension = group_info.dimension; + group_file.rows = 0; GetGroupFilePath(group_file); {