Skip to content

Commit

Permalink
Sync partiton APIs with collection (#1406)
Browse files Browse the repository at this point in the history
See also: #1403

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
  • Loading branch information
XuanYang-cn authored Apr 27, 2023
1 parent e4340f5 commit c100783
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 221 deletions.
2 changes: 1 addition & 1 deletion pymilvus/client/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def partition_name(cls, collection_name, partition_name):
def batch_insert_param(cls, collection_name, entities, partition_name, fields_info=None, **kwargs):
# insert_request.hash_keys won't be filled in client. It will be filled in proxy.

tag = partition_name or "_default" # should here?
tag = partition_name if isinstance(partition_name, str) else "_default" # should here?
insert_request = milvus_types.InsertRequest(collection_name=collection_name, partition_name=tag)

for entity in entities:
Expand Down
1 change: 0 additions & 1 deletion pymilvus/orm/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def __init__(self, name: str, schema: CollectionSchema=None, using: str="default
def __repr__(self):
_dict = {
'name': self.name,
'partitions': self.partitions,
'description': self.description,
'schema': self._schema,
}
Expand Down
Loading

0 comments on commit c100783

Please sign in to comment.