fix a bug about quert by file interface

Former-commit-id: 801726772d7555b84f36a828bded58c45692fe14
This commit is contained in:
groot 2019-06-21 20:10:43 +08:00
parent 85217d240b
commit 7032f8ac7c
2 changed files with 5 additions and 0 deletions

View File

@ -241,6 +241,10 @@ Status DBImpl::Query(const std::string& table_id, const std::vector<std::string>
return status;
}
if(files_array.empty()) {
return Status::Error("Invalid file id");
}
return QueryAsync(table_id, files_array, k, nq, vectors, dates, results);
}

View File

@ -627,6 +627,7 @@ Status DBMetaImpl::GetTableFiles(const std::string& table_id,
for (auto &file : files) {
TableFileSchema file_schema;
file_schema.table_id_ = table_id;
file_schema.file_id_ = std::get<0>(file);
file_schema.file_type_ = std::get<1>(file);
file_schema.size_ = std::get<2>(file);