#744 do not return partition table for show_tables (#747)

pull/769/head
groot 2019-12-12 20:54:17 -06:00 committed by Jin Hai
parent 93d9dc37e8
commit 86b83fb32a
2 changed files with 13 additions and 1 deletions

View File

@ -5,6 +5,7 @@ Please mark all change in change log and use the issue from GitHub
# Milvus 0.7.0 (TBD)
## Bug
- \#744 - Don't return partition table for show_tables
## Feature
- \#343 - Add Opentracing

View File

@ -173,7 +173,18 @@ DBImpl::AllTables(std::vector<meta::TableSchema>& table_schema_array) {
return SHUTDOWN_ERROR;
}
return meta_ptr_->AllTables(table_schema_array);
std::vector<meta::TableSchema> all_tables;
auto status = meta_ptr_->AllTables(all_tables);
// only return real tables, dont return partition tables
table_schema_array.clear();
for (auto& schema : all_tables) {
if (schema.owner_table_.empty()) {
table_schema_array.push_back(schema);
}
}
return status;
}
Status