Skip to content

Commit

Permalink
describecollection output add created_timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Xianhui.Lin <[email protected]>
  • Loading branch information
JsDove committed Feb 7, 2025
1 parent 768a2dd commit 6bc297e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pymilvus/client/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def __init__(self, raw: Any):
self.num_shards = 0
self.num_partitions = 0
self.enable_dynamic_field = False
self.update_timestamp = 0
self.created_timestamp = 0
if self._raw:
self.__pack(self._raw)

Expand All @@ -193,7 +193,7 @@ def __pack(self, raw: Any):
self.collection_id = raw.collectionID
self.num_shards = raw.shards_num
self.num_partitions = raw.num_partitions

self.created_timestamp = raw.created_timestamp
# keep compatible with older Milvus
try:
self.consistency_level = raw.consistency_level
Expand Down Expand Up @@ -247,6 +247,9 @@ def dict(self):
"num_partitions": self.num_partitions,
"enable_dynamic_field": self.enable_dynamic_field,
}

if self.created_timestamp != 0:
_dict["created_timestamp"] = self.created_timestamp
self._rewrite_schema_dict(_dict)
return _dict

Expand Down

0 comments on commit 6bc297e

Please sign in to comment.