未验证 提交 ed1195ed 编写于 作者: C chen qingxiang 提交者: GitHub

remove the _id fileld when get collection info (#3414)

* fix the bug of issue #3336
Signed-off-by: Ngodchen0212 <qingxiang.chen@zilliz.com>

* fix wrong test case
Signed-off-by: Ngodchen0212 <qingxiang.chen@zilliz.com>
上级 d418f54e
......@@ -1021,6 +1021,9 @@ GrpcRequestHandler::DescribeCollection(::grpc::ServerContext* context, const ::m
response->set_collection_name(request->collection_name());
for (auto& field_kv : collection_schema.fields_) {
if (field_kv.first == engine::FIELD_UID) {
continue;
}
auto field = response->add_fields();
auto& field_name = field_kv.first;
auto& field_schema = field_kv.second;
......
......@@ -71,7 +71,7 @@ class TestInfoBase:
res = connect.get_collection_info(collection_name)
assert res['auto_id'] == True
assert res['segment_row_count'] == segment_row_count
assert len(res["fields"]) == 3
assert len(res["fields"]) == 2
for field in res["fields"]:
if field["type"] == filter_field:
assert field["name"] == filter_field["name"]
......@@ -173,7 +173,7 @@ class TestInfoBase:
res = connect.get_collection_info(collection_name)
assert res['auto_id'] == True
assert res['segment_row_count'] == segment_row_count
assert len(res["fields"]) == 3
assert len(res["fields"]) == 2
for field in res["fields"]:
if field["type"] == filter_field:
assert field["name"] == filter_field["name"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册